x <- rchibarsq(100)
plot(density(x,from=0))
curve(dchibarsq(x),add=TRUE,col=2,from=0)
if (FALSE) {
library(lattice)
print(qqmath(~ simdist,
distribution=qchibarsq,
panel = function(x, ...) {
panel.qqmathline(x, ...)
panel.qqmath(x, ...)
}))
}
## create first line of table in Goldman and Whelan 2000
round(qchibarsq(c(0.01,0.05,0.9,0.95,0.975,0.99,0.995),df=1),2)
## check second line of table
round(pchibarsq(c(3.81,5.14,6.48,8.27,9.63),df=2),3)
## create middle column
round(qchibarsq(0.95,df=1:10))
Run the code above in your browser using DataLab