[R] IMPORTANT!!!! PLEASE HELP ME

Pete Brecknock Peter.Brecknock at bp.com
Sun Nov 25 01:18:46 CET 2012


Jasmin wrote
> I try to use hansen-hurwitz and horvitz-thompson estimator.So I should
> generate samples which come from normal distribution (mu=50,sigma=3).

I have taken the liberty of scaling the problem down to something more
digestible and have changed lines 5 and 7 in your code

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

HTH

Pete



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




More information about the R-help mailing list