0

这是我的拟合优度测试:

(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))

我可以做到 nsim=99,然后我尝试 nsim=100,结果如下:

> (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.

我想知道这是否是未标记包中的错误?

4

1 回答 1

0

parallel = FALSE里面试试parboot()

文档:https ://www.rdocumentation.org/packages/unmarked/versions/1.1.0/topics/parboot

于 2021-05-28T14:06:00.010 回答