[R] IMPORTANT!!!! PLEASE HELP ME

Jasmin yasemin_deniz89 at hotmail.com
Sun Nov 25 00:46:36 CET 2012


It is my assignment and I try to use hansen-hurwitz estimator &
horvitz-thompson estimator.Therefore, I  should generate samples from a type
of distribution with and without replacement. I try to use below code but I
can't do.

nsamples=1000000
sampsize=50 
i=0
y=matrix(rnorm(nsamples*sampsize,50,3),nrow=nsamples)
s=matrix(1000000,50)
for(i in 1:1000000){
s[i]=sample(y,50,replace=T)
}



--
View this message in context: http://r.789695.n4.nabble.com/IMPORTANT-PLEASE-HELP-ME-tp4650676p4650689.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list