On Thu, 6 Oct 2011, bonda wrote:
Thank you very much for the answer. If I take Poisson model and follow
"Generalized M-fluctuation tests for parameter instability", A. Zeileis and
K. Hornik, Statistica Neerlandica (2007) Vol. 61, N. 4, p. 500-501 (section
4.3):
data("Boston")
n <- 506;
I guess that this is data("Boston", package = "MASS")?
my.X <- as.matrix(cbind(1, Boston["crim"], Boston["age"]));
my.model <- glm(tax ~ crim + age, family = poisson, data = Boston);
Applying a Poisson model for count data to a tax rate seems to be very
awkward.
my.psi <- estfun(my.model);
my.mu <- fitted(my.model);
J <- sum(my.mu*my.X%*%t(my.X))/n;
This should be the covariance matrix, not a scalar.
my.process <- apply(as.matrix(my.psi), 2, cumsum)/sqrt(J*n);
gprocess <- gefp(tax ~ crim + age, family = poisson, data=Boston);
then my.process and gprocess$process have to be the same?
No. Even if you would have computed the J that you would have been
interested in (and computed its root correctly), then gefp() still uses a
different covariance matrix estimator by default.
See ?gefp and the 2006 CSDA paper for more details. Looking at the actual
code may also help.
Best regards,
Julia
--
View this message in context:
http://r.789695.n4.nabble.com/gefp-boundaries-tp3872529p3878886.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help@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.
______________________________________________
R-help@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.