Re: [Rd] Standardized Pearson residuals (and score tests)

From: Gordon K Smyth <>
Date: Fri, 18 Mar 2011 12:32:45 +1100 (AUS Eastern Daylight Time)

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.


> -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.

> --
> Peter Dalgaard
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: Priv:

The information in this email is confidential and intend...{{dropped:4}} mailing list Received on Fri 18 Mar 2011 - 01:35:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Mar 2011 - 03:10:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive