Hi all,
I just curious why estimates of function @residcov differ from directly estimating covariance of residuals from drop menu? What is formula behind function @residcov?
Intuitively, I would say that estimates of function @residcov should be the same as if I would look at covariance analysis.
Namely, I have VAR model. I made covariance matrix from VAR model using @residcov. To check this result, then, I made group of residuals from VAR model, pressed VIEW, COVARIANCE ANALYSIS, Type: ORDINARY, checked COVARIANCE and pressed OK.
Matrix from @residcov differs from matrix obtained using COVARIANCE ANALYSIS (difference is not big).
But question is WHY????
Andrei
Function @residcov
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Function @residcov
Different degrees of freedom. When you make a group of residuals, they are just series, EViews has no idea where they came from, so does the covariance analysis with standard dof. When you do it from within the VAR, EViews knows the residuals are from estimates and adjusts the dof accordingly.
Re: Function @residcov
Hi there, could you please be more specific re the adjustment with dof that you are referring to above? I would assume that the covariance is calculated as (res'res)/(#observations-#parameters), but this doesn't match up with what Eviews gives me. Thanks!
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Function @residcov
Just to follow up, it's divided by the the d.f. where the correction uses the number of parameters in the individual equation of the VAR. This allows the computation to line up the diagonals with what you would get from equation by equation estimation. So 3 variable var with 4 lags and the constant would correct using #parameters=13.
Re: Function @residcov
I have some equations in which I need to apply an adjustment ratio to the covariance of each equation's series of residuals. Based on what I read in the above posts, I understand that the number of observations needs to be subtracted by number of estimated parameters in order to get the value of the denominator of adjustment ratio (NOTE: I understand that the "var" object automatically corrects for this, but my equations are either "equation" or "system", which are not corrected for degrees of freedom). However, if I ever change the number of parameters used in one of these equations, it would be nice if the denominator of the corresponding adjustment ratio could be automatically updated (e.g., if the number of the equation's parameters changes from 7 to 8, the subtracting value in denominator would automatically be changed from 7 to
. I've looked around online to see if there's some function in EViews that returns the number of parameters in a given equation, but I don't think I found anything (although I did notice that there's a "c" series that lists all the parameters of a given equation). So is it true that there's really no easy way in EViews to retrieve the number of parameters used in an equation? Thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Function @residcov
Equation.@ncoef
Re: Function @residcov
Thanks! I think that did the trick. (:
Who is online
Users browsing this forum: No registered users and 2 guests
