* using log directory 'd:/Rcompile/CRANpkg/local/2.12/detect.Rcheck' * using R version 2.12.2 (2011-02-25) * using platform: i386-pc-mingw32 (32-bit) * using session charset: ISO8859-1 * checking for file 'detect/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'detect' version '0.1-0' * checking package name space information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking whether package 'detect' can be installed ... OK * checking package directory ... OK * checking for portable file names ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the name space can be loaded with stated dependencies ... OK * checking whether the name space can be unloaded cleanly ... OK * checking for unstated dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE svocc.step: no visible global function definition for 'BIC' * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking data for non-ASCII characters ... OK * checking examples ... ERROR Running examples in 'detect-Ex.R' failed The error most likely occurred in: > ### Name: svocc > ### Title: ZI Binomial model with single visit > ### Aliases: svocc svocc.fit extractMLE svocc.step > ### Keywords: htest models > > ### ** Examples > > data(datocc) > ## MLE > m00 <- svocc(W ~ x1 | x1 + x3, datocc) > ## PMLE > m01 <- svocc(W ~ x1 | x1 + x3, datocc, penalized=TRUE) > > ## print > m00 Call: svocc(formula = W ~ x1 | x1 + x3, data = datocc) Single visit site-occupancy model Maximum Likelihood estimates (optim method) Coefficients for occurrence (cloglog link): (Intercept) x1 -0.1323 0.1952 Coefficients for detection (logit link): (Intercept) x1 x3 1.7159 -0.8027 0.6823 > ## summary > summary(m00) Call: svocc(formula = W ~ x1 | x1 + x3, data = datocc) Single visit site-occupancy model Maximum Likelihood estimates (optim method) Occupancy model coefficients with cloglog link: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.1323 0.2473 -0.535 0.593 x1 0.1952 0.2743 0.711 0.477 Detection model coefficients with logit link: Estimate Std. Error z value Pr(>|z|) (Intercept) 1.7159 1.0181 1.685 0.092 . x1 -0.8027 0.6527 -1.230 0.219 x3 0.6823 0.4615 1.479 0.139 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Log-likelihood: -685.3 on Df AIC = > ## coefficients > coef(m00) sta_(Intercept) sta_x1 det_(Intercept) det_x1 det_x3 -0.1322958 0.1951644 1.7158595 -0.8026997 0.6823315 > ## state (occupancy) model estimates > coef(m00, "sta") (Intercept) x1 -0.1322958 0.1951644 > ## detection model estimates > coef(m00, "det") (Intercept) x1 x3 1.7158595 -0.8026997 0.6823315 > ## compare estimates > cbind(truth=c(0.6, 0.5, 0.4, -0.5, 0.3), + mle=coef(m00), pmle=coef(m01)) truth mle pmle sta_(Intercept) 0.6 -0.1322958 0.02430917 sta_x1 0.5 0.1951644 0.25655519 det_(Intercept) 0.4 1.7158595 1.17728801 det_x1 -0.5 -0.8026997 -0.65455393 det_x3 0.3 0.6823315 0.48569842 > > ## AIC, BIC > AIC(m00) [1] 1380.536 > BIC(m00) Error: could not find function "BIC" Execution halted