Re: [R] Question about statistics

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 07 Jul 2005 - 02:22:06 EST

          What do you think about the following:

library(nlme)
set.seed(1)
n <- 3;m <- 4
s.e <- 0
(X0 <- array(rep(rnorm(n), each=m)+s.e*rnorm(m*n),

            dim=c(m, n)))
s.e <- 1
(X1 <- array(rep(rnorm(n), each=m)+s.e*rnorm(m*n),

            dim=c(m, n)))

X. <- data.frame(Row=as.vector(row(X)),

           Col=as.vector(col(X)),x=as.vector(X1)) lme(x~Col, random=~1|Col, data=X.)

          For more information on this, I highly recommend Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer).

          spencer graves

Roy Werkman wrote:
> Hi,
>
> Although my question is not directly linked to R functionality, I hope
> you can forgive me for posing it here. I have been looking for the
> answer for a long time (~ 4 weeks) and have not been able to find it. My
> question is:
>
> Suppose I have an m*n matrix, with a random (normally distributed)
> number per cell. Added to that I have a random number per column. I want
> to determine the standard deviation of both distributions. For the
> column-to-column (coco) sd I do following:
>
> sd(coco) = sqrt( sd(column averages)^2 - C * sd(cece)^2 /m )
>
> Where C = (m*n-1) / (m*n-n) , and sd(cece) is the sd over the matrix
> with the column averages subtracted.
>
> My question: how can I calculate the confidence interval on sd(coco)?
>
>
> I would really appreciate your help,
> Roy Werkman
>
>

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves@pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jul 07 02:26:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:16 EST