For n = 5000 I want to estimate the probability of the type I error for HCmod using the asymptotic critical value for 0.05 signicance test Ccrit = 4.14.
I wrote the code to generate the sample and calculate p-values.
pPoiss <- function(sample,lambda){
1-ppois(sum(sample),length(sample)*lambda)
}
#p values
pvs <- c()
for (i in 1:n){
sample <- rpois(n,5)
pvs <- c(pvs,pPoiss(sample,5))
}
I am not sure where to use the information about this critical value = 4.14. Thank you for your help!
Aucun commentaire:
Enregistrer un commentaire