Calculate SSR for ARMA models

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Per
Posts: 5
Joined: Tue May 03, 2016 12:51 am

Calculate SSR for ARMA models

Postby Per » Thu Mar 09, 2017 2:16 am

Hi,

I would like to compare the SSR of linear models vs models on logged data. I understand I therefore need to calculate SSR manually, as EViews output the SSR for the transformed variable. I thought I would use the .fit command to do an in sample static forecast in order to get y_hat values and then calculcate residuals, and then square and sum them:

Code: Select all

' linear model equation lin_model.ls y c @trend ar(1) ar(2) 'calculate ssr from linear model using .fit lin_model.fit yhat_lin series res_linsq = (y - yhat_lin)^2 scalar ssr_lin = @sum(res_linsq) 'log model equation log_model.ls log(y) c @trend ar(1) ar(2) 'calculate ssr from log model using .fit log_model.fit yhat_log series res_logsq = (y - yhat_log)^2 scalar ssr_log = @sum(res_logsq)

However, I see that when I have estimated an AR(p) model, the p first values generated by .fit is NA. This differs from the values reported in actual/fitted/residuals table for the model, which do not have missing values. Thus, the SSR calculated by Eviews (reported in the regression output) differs from what I can calculate using .fit. My questions then are:

- How are the first p values of y_hat calculated by Eviews when using an AR(p) model, that are reported if I look at actual/fitted/residuals table?
- Can I easily extract the "actual" series from the actual/fitted/residuals table? If so I could use that instead of .fit
- Alternatively, is there a way to get .fit to include predictions for the first p values that are now missing?

Thanks in advance!
Attachments
ssr.prg
(625 Bytes) Downloaded 363 times
ssr.wf1
(20.6 KiB) Downloaded 324 times

Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests