R/jPofTest.R

jPofTest <-
function(n,k,p,test_significant){
# 
statistic <- -2*log(((1-p)^(n-k)*p^k)/((1-k/n)^(n-k)*(k/n)^k))
Quantile <- qchisq(1-test_significant,1)
rslt <- statistic <= Quantile
return(c(statistic,Quantile,rslt))
}

Try the jvnVaR package in your browser

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

jvnVaR documentation built on May 1, 2019, 8:29 p.m.