GMM and covariance among factors

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

RDS
Posts: 81
Joined: Thu Feb 17, 2011 9:50 am

GMM and covariance among factors

Postby RDS » Thu Jun 06, 2019 2:48 pm

Given the 7 variables (y1,...,y7) and the tree factors (x1, x2 and x3), is it possible to save the covariance of factors x1, x2 and x3 using GMM, after solving the system below?

system SDF
SDF.append ( y1*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y2*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y3*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y4*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y5*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y6*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF.append ( y7*(1 - c(1)*(x1 - c(4)) - c(2)*(x2 - c(5)) - c(3)*(x3 - c(6))) ) = 0 @ c
SDF_all_{%type}.append ( X1 - c(4) ) = 0 @ c
SDF_all_{%type}.append ( x2 - c(5) ) = 0 @ c
SDF_all_{%type}.append ( x3 - c(6) ) = 0 @ c

param c(1) 0.9 c(2) 0.9 c(3) 0.9 c(4) 0.9 c(5) 0.9 c(6) 0.9
'Sequential weighting matrix & coefficient iteration
'Cross section (White Cov) will result in GMM estimates robust to heteroskedasticity of unknown form
SDF_all_{%type}.gmm(instwgt=white,method=nstep,wtype=istdev,s)

RDS
Posts: 81
Joined: Thu Feb 17, 2011 9:50 am

Re: GMM and covariance among factors

Postby RDS » Thu Jun 20, 2019 7:23 am

I am able to save the coefficients of this system in a Table, for example
Table(1,1) = SDF.c(1)
but I am not able to save the standard errors

do you have a suggestion?

RDS
Posts: 81
Joined: Thu Feb 17, 2011 9:50 am

Re: GMM and covariance among factors

Postby RDS » Thu Jun 20, 2019 7:45 am

problem solved

Table = SDF.@stderrs(1)

RDS
Posts: 81
Joined: Thu Feb 17, 2011 9:50 am

Re: GMM and covariance among factors

Postby RDS » Thu Jun 20, 2019 7:52 am

No, actually not, because @stderrs(1) refers to the 1st coefficient, which is not necessarily c(1)

How can I get the standard errors, which are associated directly to the parameter c(1): something like @stderrs(c(1))?.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12198
Joined: Tue Sep 16, 2008 5:38 pm

Re: GMM and covariance among factors

Postby EViews Gareth » Thu Jun 20, 2019 8:15 am

No, you'll have to work out the translation manually.
Follow us on Twitter @IHSEViews


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 7 guests