[R] Stats help with calculating between and within subject variance and confidence intervals

Paul paul at paulhurley.co.uk
Thu Sep 10 08:04:30 CEST 2009


Thanks for the insight Bert.  The data I quoted are an example from a 
book(so I've got actual answers to compare to), but for my ultimate 
purpose (analytical method development) there would typically be 3-6 
replicate readings from each of 4-6 runs, which is on a similar scale.

I'll look into the lme functions.

Thanks

Paul.

Bert Gunter wrote:
> Paul:
>
> If these data are real -- or at least a reasonable facsimile -- then even
> though the machines might be considered "random" -- i.e. a sample from a
> potential population of machines -- there are too few of them to get a
> reasonable estimate of their variance. Better to treat them as fixed and
> just do a standard oneway anova with a single "within" = residual error
> component.
>
> Incidentally, this situation is quite common in gauge R&R = analytical
> method development studies. While the problem is unavoidable -- you only
> have so many machines or operators or whatever -- it is unfortunate that
> standard statistical references do not point out that it's just basically
> silly to try to estimate variance components with so few df, the resulting
> confidence intervals, as here, being so wide as to be useless (reflecting
> the inadequate information).
>
> Incidentally, a better way to get at this when there are sufficient df is
> via the lme() function in the nlme package -- it will work with unbalanced
> data and not just in the balanced data situation. But there would be a
> considerable learning curve required, I realize.
>
> Cheers,
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of Paul
> Sent: Wednesday, September 09, 2009 1:38 PM
> To: R-help at r-project.org
> Subject: [R] Stats help with calculating between and within subject variance
> and confidence intervals
>
> Hello.
> I'm trying to find a way in R to calculate between and within subject 
> variances and confidence intervals for some analytical method 
> development data.
>
> I've found a reference to a method in Burdick, R. K. & Graybill, F. A. 
> 1992, Confidence Intervals on variance components, CRC Press.  This 
> example is for Balanced Data confidence interval calculation from Pg 
> 62.  The data are fill weights from bottles sampled randomly from a 
> sample of four filling machines.  There are 12 values, and the 
> confidence intervals are for 1-2a = 95%.  I  have got the same results 
> as the book but using slightly different fomulae (see variables for H1, 
> G1 and H12 and G12).
>
> I'd appreciate any help, and any comments on whether their is a better 
> way to do this.
>
> Thanks
>
> Paul.
>   
<snip>




More information about the R-help mailing list