F.fit.table: F.fit.table - Produce a summary table of model fit...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A utility function to compile a table of fit statistics from a list of MRA fitted objects contained in the .GlobalEnv (i.e., 'working') environment. The table produced by this routine contains model name, fit statistics (AICc or QAICc), and is ranked by (sorted by) one of these fit statistics.

Usage

1
F.fit.table( fits=ls(pattern="^fit"), rank.by= "qaicc", plausible.p=0.01 )

Arguments

fits

A character vector of MRA fitted object names to include in the summary table. These names do not need to have a common root name. The default value will use any object whose name starts with "fit" in the working directory (.GlobalEnv). An an example, if fitted objects are named "fit1.01", "fit1.02", and "fit1.03", fits should equal c("fit1.01", "fit1.02", "fit1.03"), or ls(pat="^fit1"), assuming no other objects in the working directory start with "fit1".

rank.by

A string (scalar) naming the model fit statistic to include in the summary table. The resulting table is sorted by this statistic. Possible values are: "qaicc" (the default), and "aicc".

plausible.p

A scalar specifying the cut-point in rank.by weight to use during determination of 'plausible' models. A model is defined to be 'plausible' if it has rank.by weight greater than plausible.p OR if the model's log-likelihood is greater than the minimum log likelihood amongst those that have rank.by weight greater than plausible.p. See explanation of plausible in Value section below.

Details

A rudimentary check for convergence is done on each fitted model. If this routine believes a model did not converge, the model is included in the table, but the model's fit statistics are set to Inf. The test for whether a model converged is (fit$exit.code == 1) & (fit$cov.code == 0) & (fit$df > 0), where fit is the fitted object.

Fitted objects are pulled from the .GlobalEnv environment. Usually, this is the current working directory. Currently, there is no way to pull fits from another environment, but a savvy R programmer could modify the where argument of the get command embedded in this routine.

Value

A data frame, sorted by rank.by, with the following columns

model.num

Model number assigned by this routine, equal to the position of the model in the input list of fits.

model.name

Name of the fitted object.

converged

Logical values indicating whether this routine thinks the model converged or not. Value is TRUE if the this routine thinks the model converged, FALSE otherwise.

n.est.parameters

Number of estimable parameters in the model. This is MRA's guess at the number of estimable parameters in the model, not length of the coefficient vector.

n.coefficients

Number of coefficients in the model. This is length of the coefficient vector without regard to number of estimable parameters. If n.coefficients > n.est.parameters, the model is not full rank, and at least one coefficient is probably not estimable.

loglike

value of the log likelihood evaluated at the maximum likelihood parameters.

aicc

AIC of the model including the small sample correction = AIC + (2*df*(df+1)) / (nan - df - 1)

delta.aicc

Difference between AICc for the model and the minimum AICc in the table.

aicc.wgt

AICc model weights. These weights equal exp(-.5*(delta.aicc)), scaled to sum to 1.0,

qaicc

QAIC of the model including the small sample correction = QAIC + (2*df*(df+1))/(nan - df - 1)

delta.qaicc

Difference between QAICc for the model and the minimum QAICc in the table.

qaicc.wgt

QAICc model weights. These weights equal exp(-.5*(delta.qaicc)), scaled to sum to 1.0,

plausible

Indicates ‘plausible’ models as defined by Bromaghin et al. (2013). The value in this column is TRUE if the model has rank.by weight greater than plausible.p OR if the model's log-likelihood is greater than the minimum log likelihood amongst those that have rank.by weight greater than plausible.p. The second condition in this scheme includes a model structure as 'plausible' when its log-likelihood is relatively high but it has been heavily penalized by the number of parameters. When the likelihood is parameterized to contain two or more linear models, this second condition is a reasonable criterion when model selection is done in a step-wise fashion on each model separately (see Bromaghin et al., 2013).

Author(s)

Trent McDonald, WEST-INC, tmcdonald@west-inc.com

References

Bromaghin, J.F., McDonald, T. L., and Amstrup, S. C., (2013) "Plausible Combinations: An improved methods to evaluate the covariate structure of Cormack-Jolly-Seber mark-recapture models", Open Journal of Ecology, v.3, p. 11-22. (included in vignettes)

See Also

F.cjs.estim, F.huggins.estim, vignette("Bromaghin_etal_2013_OJE")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Fit several CJS model to dipper data. Summarize fits.

## Time varying survival and capture (true CJS model)
data(dipper.histories)
ct <- as.factor( paste("T",1:ncol(dipper.histories), sep=""))
attr(ct,"nan")<-nrow(dipper.histories)
dipr.01 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~tvar(ct,drop=c(1,6,7)), dipper.histories )

## Linear trend in survival
cT <- 1:ncol(dipper.histories)
dipr.02 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~tvar(cT, nan=nrow(dipper.histories)), 
  dipper.histories )

## No trend in survival
dipr.03 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~1, dipper.histories )

## Summary table
F.fit.table( ls(pat="^dipr") )

mra documentation built on May 1, 2019, 6:50 p.m.