differences between arima and fitlm functions when estimating AR(1) process
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Seraphic
el 18 de Jun. de 2023
Respondida: Ishit
el 18 de Jun. de 2023
Hi all,
I am a little confused. I have a data x, and ran following regressions to get AR(1) coefficient.
1) mdl1= estimate(arima('ARLags',1,'Constant',0), Data)
2) mdl2= fitlm(Data(1: end-1), Data(2:end), 'Intercept', false)
To my knowledge both return the same coefficients but mdl1 and mdl2 return different AR(1) coefficients. What are differences between estimate(arima()) and fitlm()? What am I missing?
0 comentarios
Respuesta aceptada
Ishit
el 18 de Jun. de 2023
Hi,
The arima and fitlm functions are both used in MATLAB for estimating linear models.
ARIMA models are used to model time series data, and the arima function in MATLAB is specifically designed for this purpose. In particular, the function is used to fit ARIMA models to time series data
In contrast, the fitlm function in MATLAB is used to fit linear regression models to data in general, not just time series data. While it can be used to estimate an AR(1) process, it does not provide the same level of functionality as the arima function.
If you are working with time series data specifically, the arima function is probably the better choice.
For more information refer to the documentation,
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Autocorrelated and Heteroscedastic Disturbances en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!