Hi there,
I need to generate a variable that has values between 0 and 10, with a mean of 4.5 and SD = 2.
I tried using rnormal but I also generate negative values
I then tried rpoisson but the range is from 0 to 12.
Lastly I tried runiformint, it keeps the range from 0 to 12 but the mean is 5 with SD=3
Can anyone help?
I need to generate a variable that has values between 0 and 10, with a mean of 4.5 and SD = 2.
I tried using rnormal but I also generate negative values
Code:
g a = rnormal(4.5, 2)
Code:
g a = rpoisson(4.5)
Code:
g a = runiformint(0, 10)
Comment