Re: [R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread Paul Johnson
Suggestion below: On Tue, Mar 13, 2012 at 1:24 PM, guillaume chaumet wrote: > I omit to precise that I already try to generate data based on the mean and > sd of two variables. > > x=rnorm(20,1,5)+1:20 > > y=rnorm(20,1,7)+41:60 > > simu<-function(x,y,n) { >    simu=vector("list",length=n) > >    

Re: [R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread guillaume chaumet
I omit to precise that I already try to generate data based on the mean and sd of two variables. x=rnorm(20,1,5)+1:20 y=rnorm(20,1,7)+41:60 simu<-function(x,y,n) { simu=vector("list",length=n) for(i in 1:n) { x=c(x,rnorm(1,mean(x),sd(x))) y=c(y,rnorm(1,mean(y),sd(y)))

[R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread guillaume chaumet
Dear R list, I have a population with two groups. I want to simulate an gradually increase of the number of subjects for group 1 based on mean and sd of two variables (correlated). Bootstrap ? Sample ? Simulation ? ( I just search some clues. Thank you Guillaume [[alternative HTML versio