On Thu, 17 Mar 2011, peter dalgaard wrote:
On Mar 16, 2011, at 23:29 , Gordon K Smyth wrote:
Hi Peter and others,
If it helps, I wrote a small function glm.scoretest() for the statmod
package on CRAN to compute score tests from glm fits. The score test
for adding a covariate, or any set of covariates, can be extracted very
neatly from the standard glm output, although you probably already know
that.
Thanks Gordon,
I'll have a look. It's the kind of think where you _strongly suspect_
that a neat solution exists, but where you can't just write it down
immediately. Looks like your code needs some elaboration to handle
factor terms and more general model reductions, though.
Yes, the glm.scoretest() function is very basic. At the moment it tests
for adding a single covariate at a time, i.e., a 1 df test, or several 1
df tests. If you like, I could add a multiple column version that would
work for factors etc, it would be only more line or so. I figure you'd
want to pull code out of glm.scoretest() rather than call it explicitly
anyway.
Gordon
-pd
Regards
Gordon
---------------------------------------------
Professor Gordon K Smyth,
NHMRC Senior Research Fellow,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
sm...@wehi.edu.au
http://www.wehi.edu.au
http://www.statsci.org/smyth
--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk Priv: pda...@gmail.com
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel