[R] Student-t distributed random value generation within a confidence interval?
Thomas Schu
th.schumann at gmx.de
Sat Nov 24 13:06:24 CET 2012
allvals <- rt(1000,df=11)
## 1000 samples is overkill: slightly more than
## 500*(1.05) should be large enough
subvals <- (allvals[abs(allvals)<qt(0.975,df=11)])
vals <- m+subvals[1:500]*s/sqrt(n)
I'm subsetting before transforming, it seems slightly easier.
</quote>
Thank you very much bbolker. It works very well!
Best regards
Thomas
--
View this message in context: http://r.789695.n4.nabble.com/Student-t-distributed-random-value-generation-within-a-confidence-interval-tp4650561p4650640.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list