[R] How are the coefficients for the ur.ers, type DF-GLS calculated?
Pfaff, Bernhard Dr.
Bernhard_Pfaff at fra.invesco.com
Thu Mar 1 11:07:45 CET 2012
Ackbar:
have a look at ur.ers directly. The coefficients can be recovered from the slot 'testreg', i.e.,
example(ur.ers)
slotNames(ers.gnp)
coef(ers.gnp at testreg)
RTFM: help("ur.ers") and help("ur.ers-class")
Best,
Bernhard
-----Ursprüngliche Nachricht-----
Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von ackbar03
Gesendet: Mittwoch, 29. Februar 2012 17:20
An: r-help at r-project.org
Betreff: [R] How are the coefficients for the ur.ers, type DF-GLS calculated?
I need some real help on this, really stuck
how are the coefficients for
ur.ers(y, type = c("DF-GLS", "P-test"), model = c("constant", "trend"),
lag.max = 0)
The max lag is set at zero, so the regression should simply be
Diff(zt) = a*z(t-1)
where a is the value i'm trying to find and z(t)'s are the detrended values.
but through performing my own regression on the two time series I get different values. This could only mean
1) Its not just a simple regression
or
2) I'm detrending my data incorrectly.
However, i've followed the instructions I've seen in research papers and it doesn't seem to be right. Basically I take Y*t = Yt-(1-(1-7/T)*Y(t-1) and regress that on 1-(1-7/T) for all t>1 and leave the values at T=1 unchanged. Then I take Yt and subtract the coefficient of the regression to get the detrended value.
I'm really stuck on this and its really frustrating. I think the easiest thing would be if someone can tell me exactly how R carries out the calculations for the functions. Help will be highly appreciated!!
--
View this message in context: http://r.789695.n4.nabble.com/How-are-the-coefficients-for-the-ur-ers-type-DF-GLS-calculated-tp4432015p4432015.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
*****************************************************************
Confidentiality Note: The information contained in this ...{{dropped:10}}
More information about the R-help
mailing list