# NOT RUN {
##N-mixture model example modified from ?pcount
# }
# NOT RUN {
require(unmarked)
##single season
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs = mallard.site,
obsCovs = mallard.obs)
##run model
fm.mallard <- pcount(~ ivel+ date + I(date^2) ~ length + elev + forest,
mallardUMF, K=30)
##compute condition number
extractCN(fm.mallard)
##compare against 'kappa'
kappa(fm.mallard@opt$hessian, exact = TRUE)
detach(package:unmarked)
# }
Run the code above in your browser using DataLab