loglik() in urca function
Dear Karla,
see help("ur.za-class") for the details of a returned object from ur.za, in particular "testreg" and in your case A at testreg. This is an S3 summary.lm object. Unfortunately, a logLik-method is only available for lm-type objects. However, you can determine an "optimal" lag length by employing ur.df() for the whole sample or a sub-sample, by using either "AIC" or "BIC" as information criteria.
hth,
Bernhard
Dear Group: I want to get the loglik of the regresion associated to the estimation of the unit root test Zivot-Andrews of the package urca. I am new using R, then I simply tried the next sequence:
A<-ur.za(var,model="intercept",lag=2) logLik(A)
but the result is an error, and I think it is because A (the result of the function) is not class S4.
class(A)
[1] "ur.za" attr(,"package") [1] "urca" I want to use the logLik to compare different number of lags, in order to know the optimal one. I will be really grateful if someone can tell me how to calculate the logLik or the optimal number of lags. Thank you very much!, Karla ?Cu?l de estas 16 personalidades es la tuya? ?Descubre qui?n eres realmente!
_________________________________________________________________ [[elided Hotmail spam]] [[alternative HTML version deleted]]
*****************************************************************
Confidentiality Note: The information contained in this ...{{dropped:10}}