didi & shahrzad
the error suggests that this function (which comes from lmtest) is not
designed to work with class of the t1c1 object. From the help file:
"The default method is already very general and applicable to a broad range
of fitted model objects, including lm and glm objects."
But, also from the help file:
"It can be easily made applicable to other model classes as well by
providing suitable methods to the standard generics terms (for deterimining
the variables in the model along with their names), update (unless only
fitted model objects are passed to waldtest, as mentioned above), residuals
(only used for determining the number of observations), df.residual (needed
for the F statisic), coef (for extracting the coefficients; needs to be
named matching the names in terms), vcov (can be user-supplied; needs to be
named matching the names in terms). Furthermore, some means of determining a
suitable name for a fitted model object can be specified (by default this is
taken to be the result of a call to formula)."
So just specify these objects in our new model (like out$coef <- your coefs,
etc.) and it should work. Depending on the restrictions you want to test,
the wald test should be easy to compute "manually" (you have the MLE, the
alternative MLEs and the observed Fisher Information and that is all you
need).
jens
-----Original Message-----
From: gov2001-l-bounces at
lists.fas.harvard.edu [mailto:gov2001-l-
bounces at
lists.fas.harvard.edu] On Behalf Of Didi Kuo
Sent: Sunday, March 30, 2008 8:44 PM
To: gov2001-l at
lists.fas.harvard.edu
Subject: [gov2001-l] Wald and Rho
Hey list,
I'm trying to compute a Wald chi squared for a random effects logit
model. It works when I do a regular logit, but I get this error with RE
logit:
waldtest(t1c1, test=("Chisq")) ## library(lmtest)
Error in update.default(fm, update) : need an object with call
component
In addition: Warning message:
In object$call : $ operator not defined for this S4 class, returning
NULL
...?
Also, is it possible to calculate Spearman's Rho for logit/RE logit
models in R?
Thanks,
didi & shahrzad
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l