[R] Robust regression with groups

Spencer Graves spencer.graves at pdf.com
Thu Oct 21 18:57:43 CEST 2004

Hi, Angelo: 

      Have you plotted the data in creative ways, e.g., normal 
probability plots and plots vs. time with a separate line for each 
subject and with separate line types colors and plotting symbols for the 
different experimental / treatment groups?  [If the response variable(s) 
are all positive, I would also try the same thing using log="y".  If the 
responses were percentages, I'd transform to empirical logits 
log(y/(1-y)) with some adjustment to "y" to shrink it away from 0 and 
1.]  I always want to do the simple things first.  Plots like this too 
often show me that my favorite model is not appropriate.  I've sometimes 
skipped this step only to be forced back to it after getting nonsense 
fits.  The Gods may have smiled upon Pygmalion, turning his beloved 
creation into a flesh and blood woman.  I more often encounter the 
"great tragedy of science:  a beautiful theory slain by an ugly fact." 

      If these plot do NOT show wild outliers, then I would think that 
"lme" would be precisely what you want, as Bert suggested.  Years ago 
George Box said he thought that unmodelled autocorrelation was harder to 
detect and potentially more damaging than nonnormality.  He said 
something to the effect, "Why worry about mice when there are tigers 

      hope this helps.  spencer graves

Berton Gunter wrote:

>If I understand you correctly, what you want is exactly the mixed effects
>model that Dmitris has already suggested. As you appear to be confused about
>the underlying statistical concepts, I suggest that you read at least the
>first and fourth chapters of MIXED-EFFECTS MODELS IN S AND S-PLUS by Bates
>and Pinheiro. Chapter 10 of MASS (4th Edition) by Venables and Ripley (which
>I would unequivocally say should be on every S language user's shelf)
>contains a much terser overview, but consequently requires a stronger
>statistical background to understand.
>My apologies if I have misunderstood, but the references are good ones
>-- Bert Gunter
>Genentech Non-Clinical Statistics
>South San Francisco, CA
>"The business of the statistician is to catalyze the scientific learning
>process."  - George E. P. Box
>>-----Original Message-----
>>From: r-help-bounces at stat.math.ethz.ch 
>>[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Angelo Secchi
>>Sent: Thursday, October 21, 2004 7:58 AM
>>To: r-help at stat.math.ethz.ch
>>Subject: Re: [R] Robust regression with groups
>>Bert you are definitely right I've been confuse
>>and unclear on the nature of my problem (sorry about that).
>>In my message "robust regression" was referred to techniques able to
>>deal (when you estimate the variance of your coefficients) with
>>departures from the set of assumptions in a standard linear 
>>like for example the presence of heteroskedaciticy. In this case the
>>robust estimator of the variance of \beta (i.e. the coefficients) is
>>obtained considering a correction that take into account the
>>contribution from each observation to the score(d(ln L)/d\beta). Now I
>>would like to consider also the possibility that observations are not
>>independent as they are but they can be divided into groups that are
>>independent. In this case to obtain an estimator for the variance
>>that take into account this departure from the standard assumptions I
>>need a correction that take into account the contribution of 
>>each group
>>(and not of each observation) to the score(d(ln L)/d\beta). 
>>In summary,
>>I do not need more sophisticated way to estimate my coefficients but
>>only a routine to obtain a meaningful estimate for the 
>>variance of them.
>>Does this routine already exist in R?
>>PS Thanks Dimitris but it seems that I cannot use a random 
>>effects model
>>since the Hausmann specification test casts doubt on the assumptions
>>justifying the use of a GLS estimator.
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567

More information about the R-help mailing list