parboot GOF test

92 views
Skip to first unread message

Emily Terry

unread,
May 28, 2021, 9:43:26 AM5/28/21
to unmarked
Hello

I'm not sure if anyone can help, I am running a parametric bootstrap GOF test. I am unable to get more than nsim=99, and I am not sure why? Please see the following: 

This is my goodness of fit test:
(fm <- distsamp(~1 ~ndvi_avg, keyfun="hazard", umf)) 
# Function returning three fit-statistics. 
fitstats <- function(fm) { 
observed <- getY(fm@data) 
expected <- fitted(fm) 
resids <- residuals(fm) 
sse <- sum(resids^2) 
chisq <- sum((observed - expected)^2 / expected) 
freeTuke <- sum((sqrt(observed) - sqrt(expected))^2) 
out <- c(SSE=sse, Chisq=chisq, freemanTukey=freeTuke) 
return(out) } (pb <- parboot(fm, fitstats, nsim=100, report=1))

I can do up to nsim=99, and then I try nsim=100 which results in the following:

> (pb <- parboot(fm, fitstats, nsim=100, report=1)) 
t0 = 103.385 540.1714 70.38591 
 Running in parallel on 3 cores. Bootstrapped statistics not reported.

Am I doing something wrong? 


Many thanks

Emily

Ken Kellner

unread,
Jun 1, 2021, 3:05:48 PM6/1/21
to unmarked
Hi Emily,

You didn't do anything wrong. parboot switches to parallel processing automatically when you have nsim >= 100, and when parallel processing, you can't incrementally report the statistics in the console. The final output should be fine. If you want to avoid this you can set the argument "parallel=FALSE" in your call to parboot().

Ken

Reply all
Reply to author
Forward
0 new messages