store residuals of fitlm model

14 vues (au cours des 30 derniers jours)
Christoph Meier
Christoph Meier le 13 Août 2015
Commenté : Qinyao Zhou le 4 Déc 2019
Dear Matlab community,
I made a multiple time series regression model, using the command
M1 = fitlm(model,Y)
I now would like to store the residuals as a separate variable.
the command
Resid1 = residuals(M1)
does not work somehow, as it says it is for mixed effect models.
What would be the right command for a fitlm model?
Thank you very much in advance!
Chris

Réponse acceptée

Christoph Meier
Christoph Meier le 13 Août 2015
I found the answer myself! Hope this helps fellow Rookies:
for raw residuals:
VARIABLENAMEFORRESIDUALS = MODELNAME.Residuals.Raw
You can alternatively store standardised residuals, see link:
  1 commentaire
Qinyao Zhou
Qinyao Zhou le 4 Déc 2019
thank you! Great help!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Analysis of Variance and Covariance dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by