Displaying 2 results from an estimated 2 matches for "dwf0".
Did you mean:
df0
2001 Nov 20
1
warning message
Hello everybody.
I would like to pose a question regarding a warning message after running
a function of my own. The function I created for computing the p-value of
the dw statistic has a command line like this:
»dwf0 <- function(dw,eigen) { carfun <- function(x) {
(prod(1+2*(eigen-dw)*1i*x)^(-1/2)-prod(1-2*(eigen-dw)*1i*x)^(-1/2))/(1i*x) }
; 1/2+integrate(f=carfun,lower = 0,upper = Inf,
subdivisions=10000)$value/(2*pi) }
, with arguments "dw" as a real and "eigen" as a vector.
A...
2001 Nov 21
2
dw statistic
...e of DW is a hard one (since it depends on X matrices and the formula
is a bit complicated), but the DW statistic is a valuable calculation in
econometrics. The package "lmtest" has a function "dwtest", but it doesn't
give any p-value.
Thank you once more.
> > »dwf0 <- function(dw,eigen) { carfun <- function(x) {
> >
>(prod(1+2*(eigen-dw)*1i*x)^(-1/2)-prod(1-2*(eigen-dw)*1i*x)^(-1/2))/(1i*x)
>}
> > ; 1/2+integrate(f=carfun,lower = 0,upper = Inf,
> > subdivisions=10000)$value/(2*pi) }
___________________________________________...