checkParms {AICcmodavg} | R Documentation |
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 class 'betareg'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'clm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'clmm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'coxme'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'coxph'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'glm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'glmmTMB'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'gls'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'gnls'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'hurdle'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'lm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'lme'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'lmekin'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'maxlikeFit'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'merMod'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'lmerModLmerTest'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'multinom'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'nlme'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'nls'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'polr'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'rlm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'survreg'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'unmarkedFit'
checkParms(mod, se.max = 25, simplify = TRUE,
...)
## S3 method for class 'vglm'
checkParms(mod, se.max = 25, ...)
## S3 method for class 'zeroinfl'
checkParms(mod, se.max = 25, ...)
Arguments
mod |
a model of |
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 |
simplify |
this argument is only valid for models of |
... |
additional arguments passed to the function. |
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).
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
( |
Author(s)
Marc J. Mazerolle
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
##example with multiple-season occupancy model modified from ?colext
## Not run:
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)
## End(Not run)
##example from Agresti 2002 of logistic regression
##with parameters estimated at the boundary (complete separation)
## Not run:
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)
## End(Not run)