The unmarkedModSel class and associated methods

Slots

Full

data.frame with formula, estimates, standard errors and model selection information. Converge is optim convergence code. CondNum is model condition number. n is the number of sites. delta is delta AIC. cumltvWt is cumulative AIC weight. Rsq is Nagelkerke's (1991) R-squared index, which is only returned when the nullmod argument is specified.

Names

matrix referencing column names of estimates (row 1) and standard errors (row 2).

Methods

show

Print the AIC model selection table

coef

Data frame of coefficients from all models in model selection table

SE

Data frame of coefficient SEs from all models in model selection table

See also

Examples

data(linetran)
(dbreaksLine <- c(0, 5, 10, 15, 20)) 
#> [1]  0  5 10 15 20
lengths <- linetran$Length * 1000

ltUMF <- with(linetran, {
  unmarkedFrameDS(y = cbind(dc1, dc2, dc3, dc4), 
  siteCovs = data.frame(Length, area, habitat), dist.breaks = dbreaksLine,
  tlength = lengths, survey = "line", unitsIn = "m")
  })

fm1 <- distsamp(~ 1 ~1, ltUMF)
fm2 <- distsamp(~ area ~1, ltUMF)
fm3 <- distsamp( ~ 1 ~area, ltUMF)

fl <- fitList(Null=fm1, A.=fm2, .A=fm3)
fl
#> An object of class "unmarkedFitList"
#> Slot "fits":
#> $Null
#> 
#> Call:
#> distsamp(formula = ~1 ~ 1, data = ltUMF)
#> 
#> Density (log-scale):
#>  Estimate    SE     z P(>|z|)
#>    -0.171 0.134 -1.28   0.201
#> 
#> Detection (log-scale):
#>  Estimate    SE    z  P(>|z|)
#>      2.39 0.127 18.7 2.46e-78
#> 
#> AIC: 164.7524 
#> Number of sites: 12
#> 
#> Survey design: line-transect
#> Detection function: halfnorm
#> UnitsIn: m
#> UnitsOut: ha 
#> 
#> 
#> $A.
#> 
#> Call:
#> distsamp(formula = ~area ~ 1, data = ltUMF)
#> 
#> Density (log-scale):
#>  Estimate    SE     z P(>|z|)
#>    -0.168 0.134 -1.25    0.21
#> 
#> Detection (log-scale):
#>             Estimate     SE     z  P(>|z|)
#> (Intercept)     3.00 0.5402  5.56 2.72e-08
#> area           -0.12 0.0955 -1.26 2.07e-01
#> 
#> AIC: 165.1845 
#> Number of sites: 12
#> 
#> Survey design: line-transect
#> Detection function: halfnorm
#> UnitsIn: m
#> UnitsOut: ha 
#> 
#> 
#> $.A
#> 
#> Call:
#> distsamp(formula = ~1 ~ area, data = ltUMF)
#> 
#> Density (log-scale):
#>             Estimate     SE      z P(>|z|)
#> (Intercept)   0.2364 0.5123  0.462   0.644
#> area         -0.0801 0.0979 -0.817   0.414
#> 
#> Detection (log-scale):
#>  Estimate    SE    z  P(>|z|)
#>      2.39 0.127 18.7 2.47e-78
#> 
#> AIC: 166.0759 
#> Number of sites: 12
#> 
#> Survey design: line-transect
#> Detection function: halfnorm
#> UnitsIn: m
#> UnitsOut: ha 
#> 
#> 
#> 

ms <- modSel(fl, nullmod="Null")
ms
#>      nPars    AIC delta AICwt cumltvWt   Rsq
#> Null     2 164.75  0.00  0.43     0.43 0.000
#> A.       3 165.18  0.43  0.35     0.78 0.122
#> .A       3 166.08  1.32  0.22     1.00 0.055

coef(ms)                            # Estimates only
#>        lam(Int)   lam(area)   p(Int)   p(area)
#> Null -0.1710554          NA 2.386380        NA
#> A.   -0.1678270          NA 3.002507 -0.120364
#> .A    0.2364320 -0.08005895 2.386386        NA
SE(ms)                              # Standard errors only
#>      SElam(Int) SElam(area)  SEp(Int)  SEp(area)
#> Null  0.1337819          NA 0.1273598         NA
#> A.    0.1340212          NA 0.5401575 0.09548038
#> .A    0.5122837   0.0979427 0.1273614         NA
(toExport <- as(ms, "data.frame"))  # Everything
#>   model   formula   lam(Int) SElam(Int) lam(area) SElam(area)   p(Int)
#> 1  Null    ~1 ~ 1 -0.1710554  0.1337819        NA          NA 2.386380
#> 2    A. ~area ~ 1 -0.1678270  0.1340212        NA          NA 3.002507
#>    SEp(Int)   p(area)  SEp(area) Converge     CondNum negLogLike nPars  n
#> 1 0.1273598        NA         NA        0    5.199344   80.37622     2 12
#> 2 0.5401575 -0.120364 0.09548038        0 1065.747363   79.59224     3 12
#>        AIC     delta     AICwt       Rsq  cumltvWt
#> 1 164.7524 0.0000000 0.4307243 0.0000000 0.4307243
#> 2 165.1845 0.4320554 0.3470401 0.1224859 0.7777644
#>  [ reached 'max' / getOption("max.print") -- omitted 1 rows ]