Skip to content
Back to formatted view

Raw Message

Message-ID: <x2n0i9m4am.fsf@biostat.ku.dk>
Date: 2003-04-29T20:34:09Z
From: Peter Dalgaard
Subject: R help
In-Reply-To: <20030429195425.18439.qmail@web10904.mail.yahoo.com>

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