Message-ID: <50EBCDA9.8010305@xtra.co.nz>
Date: 2013-01-08T07:41:29Z
From: Rolf Turner
Subject: Have problem to do loop to generate transformed chi-squared variates
In-Reply-To: <1357575236.15427.YahooMailNeo@web122506.mail.ne1.yahoo.com>
Homework? We don't do people's homework for them.
cheers,
Rolf Turner
On 01/08/2013 05:13 AM, Agnes Ayang wrote:
> Hello R-helpers,
>
> I need to generate standard variates normal to 'create' chi-squared variates. To make you more understand,
>
> (1) a<-rnorm(3,0,1)
>
> *after do (1), I need to squared and summed the three values. My problem is, how am I going to continue the programming if I had to repeat the process for 15 times, which in the end I will get 15 values from the whole programme.Hope you can help.