search for: temp1a

Displaying 1 result from an estimated 1 matches for "temp1a".

Did you mean: temp1
2004 Sep 05
1
Biased calculations from using rmultinom?
...(q) mean.o<-sum(n*q*mean.cost.m)/k result<-sum(n*var.cost.m*q+mean.cost.m^2*(n*q*(1-q+n*q))-2*mean.o*n*q*mean.cost.m+mean.o^2)/(k-1) } # Test: p1<-c(10,10,1,8,8,6,10,9,6,5) p1<-p1/sum(p1) e<-5 f<-60000 n1<-4 n.rep<-50000 n.gen<-n1*n.rep A<-fun.runif(n.gen,e,f) temp1a<-rmultinom(n.gen,1,p1)*A # Randomly select items to split sam<-sample(rep(1:n.rep,each=n1)) temp3<-sapply(fun.split.matrix(temp1a,sam),colSums) junk.vars<-apply(temp3,2,var) junk.m<-mean(junk.vars) junk.theo<-fun.var.match.gen(p1,n1,(e+f)/2,(f-e)^2/12) plot(junk.vars) abline(h=j...