Problem with testing autocorrelation and instruments

Hello, everyone, I am currently struggling with my HW for econometrics. Our task is to built forward-looking model using GMM (generalized method of moments). I have chosen for analysis the consumtion based asset pricing model. But I have problems with testing autocorrelation and instruments (weakness etc). When I want to test autoccorelelation using Ljung-Box test - the result is just error :smiley:
E.G. this is my code:

Euler.gmm2 <- gmm(g = Euler, x = z,
                  t0 = startv,
                  wmatrix = "optimal", vcov = "HAC")

And when I want to test the autoccrelation using this code:

Box.test(Euler.gmm2$residuals, lag=1, type = "Lj")

I have this error: Error in ts(x) : 'ts' object must have one or more observations

Thx for your help.

view or plot gmm2.residuals to see if they are there and not NA.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.