AICcmodavg (version 2.3-1)

checkParms: Identify Parameters with Large Standard Errors

Description

This function identifies parameter estimates with large standard errors in a model. It is particularly useful for complex models with different parameter types such as those of unmarkedFit classes implemented in package unmarked (Fiske and Chandler, 2011), as well as other types of regression models.

Usage

checkParms(mod, se.max = 25, simplify = TRUE, ...)

# S3 method for betareg checkParms(mod, se.max = 25, ...)

# S3 method for clm checkParms(mod, se.max = 25, ...)

# S3 method for clmm checkParms(mod, se.max = 25, ...)

# S3 method for coxme checkParms(mod, se.max = 25, ...)

# S3 method for coxph checkParms(mod, se.max = 25, ...)

# S3 method for glm checkParms(mod, se.max = 25, ...)

# S3 method for glmmTMB checkParms(mod, se.max = 25, ...)

# S3 method for gls checkParms(mod, se.max = 25, ...)

# S3 method for gnls checkParms(mod, se.max = 25, ...)

# S3 method for hurdle checkParms(mod, se.max = 25, ...)

# S3 method for lm checkParms(mod, se.max = 25, ...)

# S3 method for lme checkParms(mod, se.max = 25, ...)

# S3 method for lmekin checkParms(mod, se.max = 25, ...)

# S3 method for maxlikeFit checkParms(mod, se.max = 25, ...)

# S3 method for merMod checkParms(mod, se.max = 25, ...)

# S3 method for lmerModLmerTest checkParms(mod, se.max = 25, ...)

# S3 method for multinom checkParms(mod, se.max = 25, ...)

# S3 method for nlme checkParms(mod, se.max = 25, ...)

# S3 method for nls checkParms(mod, se.max = 25, ...)

# S3 method for polr checkParms(mod, se.max = 25, ...)

# S3 method for rlm checkParms(mod, se.max = 25, ...)

# S3 method for survreg checkParms(mod, se.max = 25, ...)

# S3 method for unmarkedFit checkParms(mod, se.max = 25, simplify = TRUE, ...)

# S3 method for vglm checkParms(mod, se.max = 25, ...)

# S3 method for zeroinfl checkParms(mod, se.max = 25, ...)

Value

checkParms returns a list of class checkParms with the following components:

model.class

the class of the model for which diagnostics are requested.

se.max

the value of SE used as a threshold in diagnostics. The function reports the number of parameter estimates with SE > se.max.

result

a matrix consisting of three columns, namely, the identity of the parameter estimate with the highest SE (variable), its standard error (max.se), and the number of parameter estimates with SE larger than se.max (n.high.se). For classical regression models with a single response variable, the row name is labeled beta. For unmarkedFit models, the matrix either consists of a single row (simplify = TRUE) labeled with the name of the parameter type (e.g., psi, gam, eps, p) where the highest SE occurs, or consists of as many rows as there are parameter types (simplify = FALSE).

Arguments

mod

a model of unmarkedFit classes or other regression model. This model is checked to determine the occurrence of large standard errors for parameter estimates.

se.max

specifies the value beyond which standard errors are deemed high for the model at hand. The function will determine the number of estimates with standard errors that exceed se.max.

simplify

this argument is only valid for models of unmarkedFit classes which consist of several parameter types for detection probability and demographic parameters (e.g., abundance, occupancy, extinction). If TRUE, the function returns a matrix with a single row identifying the parameter type and estimate with the highest standard error. If FALSE, the function returns a matrix with as many rows as there are parameter types in the model. In the latter case, the estimate with the highest standard error for each parameter type is presented.

...

additional arguments passed to the function.

Author

Marc J. Mazerolle

Details

In some complex models such as certain hierarchical models (Royle and Dorazio 2008, Kéry and Royle 2015), issues in estimating parameters and their standard errors can occur. Large standard errors can be indicative of problems in estimating certain parameters due to sparse data, parameters on the boundary, or model misspecification. The checkParms function computes the number of parameter estimates with standard errors larger than se.max and identifies the parameter estimate with the largest standard error across all parameter types (simplify = TRUE) or for each parameter type (simplify = FALSE).

To help identify large standard errors, users can standardize numeric explanatory variables to zero mean and unit variance. The checkParms function can also be useful to identify boundary estimates in classic generalized models or their extensions (Venables and Ripley 2002).

References

Agresti, A. (2002) Categorical data analysis. John Wiley and Sons, Inc.: Hoboken.

Fiske, I., Chandler, R. (2011) unmarked: An R Package for fitting hierarchical models of wildlife occurrence and abundance. Journal of Statistical Software 43, 1--23.

Kéry, M., Royle, J. A. (2015) Applied hierarchical modeling in ecology: analysis of distribution, abundance and species richness in R and BUGS. Academic Press, New York, USA.

Royle, J. A., Dorazio, R. M. (2008) Hierarchical modeling and inference in ecology: the analysis of data from populations, metapopulations and communities. Academic Press: New York.

Venables, W. N., Ripley, B. D. (2002) Modern applied statistics with S, 2nd edition. Springer-Verlag: New York.

See Also

c_hat, detHist, checkConv, countDist, countHist, extractCN, mb.gof.test, Nmix.gof.test, parboot

Examples

Run this code
##example with multiple-season occupancy model modified from ?colext
if (FALSE) {
require(unmarked)
data(frogs)
umf <- formatMult(masspcru)
obsCovs(umf) <- scale(obsCovs(umf))
siteCovs(umf) <- rnorm(numSites(umf))
yearlySiteCovs(umf) <- data.frame(year = factor(rep(1:7,
                                    numSites(umf))))

##model with with year-dependent transition rates
fm.yearly <- colext(psiformula = ~ 1, gammaformula = ~ year,
                    epsilonformula = ~ year,
                    pformula = ~ JulianDate + I(JulianDate^2),
                    data = umf)

##check for high SE's and report highest
##across all parameter types
checkParms(fm.yearly, simplify = TRUE)

##check for high SE's and report highest
##for each parameter type
checkParms(fm.yearly, simplify = FALSE)
detach(package:unmarked)
}

##example from Agresti 2002 of logistic regression
##with parameters estimated at the boundary (complete separation)
if (FALSE) {
x <- c(10, 20, 30, 40, 60, 70, 80, 90)
y <- c(0, 0, 0, 0, 1, 1, 1, 1)

m1 <- glm(y ~ x, family = binomial)
checkParms(m1)
}

Run the code above in your browser using DataCamp Workspace