[R] Data generation for a distribution

2012-04-23 Thread Mohan Radhakrishnan
Hi, I am a new user and this is a basic question. I have read the posting guidelines too. So if this more appropriate for a statistics forum I will ask them. I have a socket server and client and the bytes are piped to graphite which is a graphing library. The intention is to under

Re: [R] data generation

2012-03-04 Thread Joshua Wiley
Hi deb, I am not clear what you want exactly, but something like: x <- runif(1000) y <- x^2 + rnorm(1000, mean = 0, sd = 1) might do what you want. See ?runif for documentation. It generates random numbers from the uniform distribution, and ditto for rnorm except from normal. Cheers, Josh O

[R] data generation

2012-03-04 Thread mail me
Hi: I am trying to generate data form a simple linear regression model. The training data T = {(x1, y1), . . . , (xn), yn}, want to sample x uniformly from the range [0,1], find uncorrupted response y = x^2, and generate random noise "e" from normal distribution N(0, 1). Any idea how to do in sim

Re: [R] Data generation

2012-01-30 Thread MK
Assuming you want the whole data matrix coming from a single distribution. matrix(rnorm(20 *30, 3, 1), 20, 30) On 30/01/12 06:33, Partha Sinha wrote: I want to generate a data matrix (20*30) having mean 3 and std deviation 1 (normal dist). pl help Partha __

[R] Data generation

2012-01-30 Thread Partha Sinha
I want to generate a data matrix (20*30) having mean 3 and std deviation 1 (normal dist). pl help Partha __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-g