inst/snippet/golfballs-lrt.R

# LRT calculation
O <- golfballs; O
E <- rep(486/4,4); E
G <- 2 * sum ( O * log(O/E)); G       # lrt Goodness of fit statistic
1 - pchisq(G,df=3)

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 1, 2019, 11:18 p.m.