• using R version 3.0.1 Patched (2013-05-18 r62762)
  • using platform: sparc-sun-solaris2.10 (32-bit)
  • using session charset: UTF-8
  • checking for file ‘AICcmodavg/DESCRIPTION’ ... OK
  • checking extension type ... Package
  • this is package ‘AICcmodavg’ version ‘1.30’
  • checking package namespace information ... OK
  • checking package dependencies ... NOTE
    Package suggested but not available for checking: ‘unmarked’
  • checking if this is a source package ... OK
  • checking if there is a namespace ... OK
  • checking for executable files ... OK
  • checking for hidden files and directories ... OK
  • checking for portable file names ... OK
  • checking for sufficient/correct file permissions ... OK
  • checking whether package ‘AICcmodavg’ can be installed ... OK
  • checking installed package size ... OK
  • checking package directory ... OK
  • checking DESCRIPTION meta-information ... OK
  • checking top-level files ... OK
  • checking for left-over 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 namespace can be loaded with stated dependencies ... OK
  • checking whether the namespace can be unloaded cleanly ... OK
  • checking loading without being on the library search path ... 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
    mb.gof.test: no visible global function definition for ‘parboot’
  • checking Rd files ... OK
  • checking Rd metadata ... OK
  • checking Rd cross-references ... NOTE
    Package unavailable to check Rd xrefs: ‘unmarked’
  • 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 contents of ‘data’ directory ... OK
  • checking data for non-ASCII characters ... OK
  • checking data for ASCII and uncompressed saves ... OK
  • checking examples ... ERROR
    Running examples in ‘AICcmodavg-Ex.R’ failed
    The error most likely occurred in:

    > ### Name: AICcmodavg-package
    > ### Title: Model Selection and Multimodel Inference Based on (Q)AIC(c)
    > ### Aliases: AICcmodavg-package AICcmodavg
    > ### Keywords: models
    >
    > ### ** Examples
    >
    > ##anuran larvae example from Mazerolle (2006) - Poisson GLM with offset
    > data(min.trap)
    > ##assign "UPLAND" as the reference level as in Mazerolle (2006)
    > min.trap$Type <- relevel(min.trap$Type, ref = "UPLAND")
    >
    > ##set up candidate models
    > Cand.mod <- list()
    > ##global model
    > Cand.mod[[1]] <- glm(Num_anura ~ Type + log.Perimeter + Num_ranatra,
    + family = poisson, offset = log(Effort),
    + data = min.trap)
    > Cand.mod[[2]] <- glm(Num_anura ~ Type + log.Perimeter, family = poisson,
    + offset = log(Effort), data = min.trap)
    > Cand.mod[[3]] <- glm(Num_anura ~ Type + Num_ranatra, family = poisson,
    + offset = log(Effort), data = min.trap)
    > Cand.mod[[4]] <- glm(Num_anura ~ Type, family = poisson,
    + offset = log(Effort), data = min.trap)
    > Cand.mod[[5]] <- glm(Num_anura ~ log.Perimeter + Num_ranatra,
    + family = poisson, offset = log(Effort),
    + data = min.trap)
    > Cand.mod[[6]] <- glm(Num_anura ~ log.Perimeter, family = poisson,
    + offset = log(Effort), data = min.trap)
    > Cand.mod[[7]] <- glm(Num_anura ~ Num_ranatra, family = poisson,
    + offset = log(Effort), data = min.trap)
    > Cand.mod[[8]] <- glm(Num_anura ~ 1, family = poisson,
    + offset = log(Effort), data = min.trap)
    >
    > ##check c-hat for global model
    > c_hat(Cand.mod[[1]]) #uses Pearson's chi-square/df
    [1] 1.037769
    > ##note the very low overdispersion: in this case, the analysis could be
    > ##conducted without correcting for c-hat as its value is reasonably close
    > ##to 1
    >
    > ##assign names to each model
    > Modnames <- c("type + logperim + invertpred", "type + logperim",
    + "type + invertpred", "type", "logperim + invertpred",
    + "logperim", "invertpred", "intercept only")
    >
    > ##model selection table based on AICc
    > aictab(cand.set = Cand.mod, modnames = Modnames)

    Model selection based on AICc :

    K AICc Delta_AICc AICcWt Cum.Wt LL
    type + invertpred 3 54.03 0.00 0.60 0.60 -23.42
    type + logperim + invertpred 4 56.57 2.54 0.17 0.77 -23.23
    logperim + invertpred 3 57.91 3.88 0.09 0.86 -25.35
    invertpred 2 58.63 4.60 0.06 0.92 -27.03
    type + logperim 3 59.38 5.35 0.04 0.96 -26.09
    type 2 59.74 5.71 0.03 1.00 -27.58
    intercept only 1 65.47 11.44 0.00 1.00 -31.65
    logperim 2 67.27 13.24 0.00 1.00 -31.35

    >
    > ##compute evidence ratio
    > evidence(aictab(cand.set = Cand.mod, modnames = Modnames))

    Evidence ratio between models ' type + invertpred ' and ' type + logperim + invertpred ':
    3.56

    >
    > ##compute confidence set based on 'raw' method
    > confset(cand.set = Cand.mod, modnames = Modnames, second.ord = TRUE,
    + method = "raw")

    Confidence set for the best model

    Method: raw sum of model probabilities

    95% confidence set:
    K AICc Delta_AICc AICcWt
    type + invertpred 3 54.03 0.00 0.60
    type + logperim + invertpred 4 56.57 2.54 0.17
    logperim + invertpred 3 57.91 3.88 0.09
    invertpred 2 58.63 4.60 0.06
    type + logperim 3 59.38 5.35 0.04

    Model probabilities sum to 0.96

    >
    > ##compute importance value for "TypeBOG" - same number of models
    > ##with vs without variable
    > importance(cand.set = Cand.mod, modnames = Modnames, parm = "TypeBOG")

    Importance values of ' TypeBOG ' :

    w+ (models including parameter): 0.85
    w- (models excluding parameter): 0.15

    >
    > ##compute model-averaged estimate of "TypeBOG"
    > modavg(cand.set = Cand.mod, modnames = Modnames, parm = "TypeBOG")

    Multimodel inference on " TypeBOG " based on AICc

    AICc table used to obtain model-averaged estimate:

    K AICc Delta_AICc AICcWt Estimate SE
    type + logperim + invertpred 4 56.57 2.54 0.20 -1.19 0.62
    type + logperim 3 59.38 5.35 0.05 -1.70 0.59
    type + invertpred 3 54.03 0.00 0.71 -1.35 0.56
    type 2 59.74 5.71 0.04 -1.42 0.56

    Model-averaged estimate: -1.34
    Unconditional SE: 0.58
    95 % Unconditional confidence interval: -2.48 , -0.19

    >
    > ##compute model-averaged estimate of "TypeBOG" with shrinkage
    > ##same number of models with vs without variable
    > modavg.shrink(cand.set = Cand.mod, modnames = Modnames,
    + parm = "TypeBOG")

    Multimodel inference on " TypeBOG " based on AICc

    AICc table used to obtain model-averaged estimate with shrinkage:

    K AICc Delta_AICc AICcWt Estimate SE
    type + logperim + invertpred 4 56.57 2.54 0.17 -1.19 0.62
    type + logperim 3 59.38 5.35 0.04 -1.70 0.59
    type + invertpred 3 54.03 0.00 0.60 -1.35 0.56
    type 2 59.74 5.71 0.03 -1.42 0.56
    logperim + invertpred 3 57.91 3.88 0.09 0.00 0.00
    logperim 2 67.27 13.24 0.00 0.00 0.00
    invertpred 2 58.63 4.60 0.06 0.00 0.00
    intercept only 1 65.47 11.44 0.00 0.00 0.00

    Model-averaged estimate with shrinkage: -1.14
    Unconditional SE: 0.72
    95 % Unconditional confidence interval: -2.54 , 0.27

    >
    > ##compute model-average predictions for two types of ponds
    > ##create a data set for predictions
    > dat.pred <- data.frame(Type = factor(c("BOG", "UPLAND")),
    + log.Perimeter = mean(min.trap$log.Perimeter),
    + Num_ranatra = mean(min.trap$Num_ranatra),
    + Effort = mean(min.trap$Effort))
    >
    > ##model-averaged predictions across entire model set
    > modavgpred(cand.set = Cand.mod, modnames = Modnames,
    + newdata = dat.pred)

    Model-averaged predictions on the response scale based on entire model set:

    mod.avg.pred uncond.se
    1 0.28 0.18
    2 0.86 0.35

    >
    >
    >
    > ##single-season occupancy model example modified from ?occu
    > require(unmarked)
    Loading required package: unmarked
    Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
    there is no package called ‘unmarked’
    > ##single season
    > data(frogs)
    Warning in data(frogs) : data set ‘frogs’ not found
    > pferUMF <- unmarkedFrameOccu(pfer.bin)
    Error: could not find function "unmarkedFrameOccu"
    Execution halted