Page 1 of 1

generate a vector normally distributed

Posted: Mon Aug 15, 2011 11:07 am
by jiji
hello,
I want to generate a 3 dimentional vector normally distributed with constant mean and variance <1.
Do I generate each element separately? and what parameters to assign to each element?
Thanks.

Re: generate a vector normally distributed

Posted: Mon Aug 15, 2011 11:12 am
by EViews Gareth
I'm not sure what you mean by a 3-dimensional vector.

However, you can create a normally distributed random vector like so:

Code: Select all

vector(10) myvec nrnd(myvec)
That creates a standard normal. You can multiply by the standard deviation you want to de-standardise it.