[R] R help

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Apr 29 22:34:09 CEST 2003


Shutnik <shutnik_xx at yahoo.co.uk> writes:

>  Hello,
>  I have the normal random variables y(t)~N(mu, sigma.sq) and want to decompose them into n normal variables:
> 
>  y(t) = x(t,1) + 
 + x(t,n) 
> 
> x(t,i)~N(mu, sigma.sq/n) 
> 
>  The problem is not as simple as can appear. All my experiments didn’t give me anything so far. Are there any tools to do this?
> 

This should work, provided I understand the problem correctly:

x <- rnorm(n,sd=sqrt(sigma.sq/n))
x <- x - mean(x) + y/n

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-help mailing list