[R-SIG-Finance] ca.po Pz test question
Pfaff, Bernhard Dr.
Bernhard_Pfaff at fra.invesco.com
Fri Sep 1 14:41:48 CEST 2006
Hello Victor,
let me answer your questions in turn:
>Hello,
>I have a few questions about Phillips& Ouliaris Unit Root Test
>of type Pz
>1) I noticed that critical values given in the article
>"Asymptotic properties of residual..." by Phillips and
>Ouliaris are different from those given by R. More presicely -
>they are swaped with each other. Could explain why?
No, probably you should contact R.More, to clarify the issue.
Incidentally, would it be possible to provide a source for 'R.More';
i.e., to which article, monographie are you referring?
>2) that question is quite stupid. Can you explain what
>coefficients for test Pz mean?
>for Pu it is straight-forward - Var1~ Var2*k1 + intercept
>+u. and u is tested for having a unit root.
>for Pz there it looks like
>Coefficients:
> Estimate Std. Error t value Pr(>|t|)
>(Intercept) 0.010013 0.002409 4.156 3.40e-05 ***
>zrV1 0.971824 0.006092 159.536 < 2e-16 ***
>zrV2 0.108994 0.047737 2.283 0.0225 *
>
>is it an equation for first differences? like if zrV1 is the
>first differ for V1 and zrV2 is the first diff for zrV2 then
>k1*zrV1+k2*zrV2+intercept~0 ???
>
Type 'ca.po' at the prompt and you will see function. Here, you will
find pretty at the beginning of the function's body:
.
.
.
zl <- z[2:nobs, ]
zr <- z[1:(nobs - 1), ]
.
.
.
and further below:
.
.
.
else if (type == "Pz") {
test.reg <- summary(lm(zl ~ zr))
.
.
.
hence, the levels of the endogenous variables are regressed on their
first lag. See ?lm for how lm behaves if a matrix/data.frame is on the
left hand side.
>3) and the last question - why for Pz there is an option to
>use demean="trend" and there is no such an option for Pu?
>
Well, to be precise: if you call type = "Pz" and demean = "trend" an
error is returned; and here you caught me. The trend 'trd' is not set
properly, you can fix this easily by inserting the line end marked as:
## inserting fix:
else if (demean == "trend") {
ari3 <- 3
model <- "with constant and linear trend"
trd <- 1:nobs
res <- residuals(lm(zl ~ zr + trd))
if (type == "Pu") {
trd <- 1:(nobs+1) ## inserting fix
resu <- residuals(lm(z[, 1] ~ z[, -1] + trd))
test.reg <- summary(lm(z[, 1] ~ z[, -1] + trd))
}
else if (type == "Pz") {
test.reg <- summary(lm(zl ~ zr + trd))
}
}
I will send an corrected version of 'urca' to CRAN; thanks for pointing
this out.
Best,
Bernhard
>Kind regards,
>Victor
> [[alternative HTML version deleted]]
>
>_______________________________________________
>R-SIG-Finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
*****************************************************************
Confidentiality Note: The information contained in this mess...{{dropped}}
More information about the R-SIG-Finance
mailing list