PLEASE remember: This list has a "no homework" policy. Students
should do their own homework.
cheers,
Rolf Turner
On 25/11/12 13:18, Pete Brecknock wrote:
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)
}
______________________________________________
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-guide.html
and provide commented, minimal, self-contained, reproducible code.