data(frogs)
pferUMF <- unmarkedFrameOccu(pfer.bin)
plot(pferUMF, panels=4)
# add some fake covariates for illustration
siteCovs(pferUMF) <- data.frame(sitevar1 = rnorm(numSites(pferUMF)))
# observation covariates are in site-major, observation-minor order
obsCovs(pferUMF) <- data.frame(obsvar1 = rnorm(numSites(pferUMF) * obsNum(pferUMF)))
(fm <- occu(~ obsvar1 ~ 1, pferUMF))
confint(fm, type='det', method = 'normal')
confint(fm, type='det', method = 'profile')
# estimate detection effect at obsvars=0.5
(lc <- linearComb(fm['det'],c(1,0.5)))
# transform this to probability (0 to 1) scale and get confidence limits
(btlc <- backTransform(lc))
confint(btlc, level = 0.9)
# Empirical Bayes estimates of proportion of sites occupied
re <- ranef(fm)
sum(bup(re, stat="mode"))
Run the code above in your browser using DataLab