hhh4_methods {surveillance} | R Documentation |
Print, Summary and other Standard Methods for "hhh4"
Objects
Description
Besides print
and summary
methods there are also some standard
extraction methods defined for objects of class "hhh4"
resulting
from a call to hhh4
.
The implementation is illustrated in Meyer et al. (2017, Section 5),
see vignette("hhh4_spacetime")
.
Usage
## S3 method for class 'hhh4'
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'hhh4'
summary(object, maxEV = FALSE, ...)
## S3 method for class 'hhh4'
coef(object, se = FALSE, reparamPsi = TRUE,
idx2Exp = NULL, amplitudeShift = FALSE, ...)
## S3 method for class 'hhh4'
fixef(object, ...)
## S3 method for class 'hhh4'
ranef(object, tomatrix = FALSE, intercept = FALSE, ...)
## S3 method for class 'hhh4'
coeflist(x, ...)
## S3 method for class 'hhh4'
formula(x, ...)
## S3 method for class 'hhh4'
nobs(object, ...)
## S3 method for class 'hhh4'
logLik(object, ...)
## S3 method for class 'hhh4'
vcov(object, reparamPsi = TRUE,
idx2Exp = NULL, amplitudeShift = FALSE, ...)
## S3 method for class 'hhh4'
confint(object, parm, level = 0.95,
reparamPsi = TRUE, idx2Exp = NULL, amplitudeShift = FALSE, ...)
## S3 method for class 'hhh4'
residuals(object, type = c("deviance", "response"), ...)
Arguments
x , object |
an object of class |
digits |
the number of significant digits to use when printing parameter estimates. |
maxEV |
logical indicating if the summary should contain the
(range of the) dominant eigenvalue as a measure of the importance of
the epidemic components. By default, the value is not calculated as
this may take some seconds depending on the number of time points
and units in |
... |
For the |
reparamPsi |
logical. If |
se |
logical switch indicating if standard errors are required |
idx2Exp |
integer vector selecting the parameters
which should be returned on exp-scale.
Alternatively, |
amplitudeShift |
logical switch indicating whether the parameters
for sine/cosine terms modelling seasonal patterns
(see |
tomatrix |
logical. If |
intercept |
logical. If |
parm |
a vector of numbers or names, specifying which parameters are to be given confidence intervals. If missing, all parameters are considered. |
level |
the confidence level required. |
type |
the type of residuals which should be returned. The
alternatives are |
Value
The coef
-method returns all estimated (regression)
parameters from a hhh4
model.
If the model includes random effects, those can be extracted with
ranef
, whereas fixef
returns the fixed parameters.
The coeflist
-method extracts the model coefficients in a list
(by parameter group).
The formula
-method returns the formulae used for the
three log-linear predictors in a list with elements "ar"
,
"ne"
, and "end"
.
The nobs
-method returns the number of observations used
for model fitting.
The logLik
-method returns an object of class
"logLik"
with "df"
and "nobs"
attributes.
For a random effects model, the value of the penalized
log-likelihood at the MLE is returned, but degrees of freedom are
not available (NA_real_
).
As a consequence, AIC
and BIC
are only
well defined for models without random effects;
otherwise these functions return NA_real_
.
The vcov
-method returns the estimated
variance-covariance matrix of the regression parameters.
The estimated variance-covariance matrix of random effects is
available as object$Sigma
.
The confint
-method returns Wald-type confidence
intervals (assuming asymptotic normality).
The residuals
-method extracts raw ("response"
) or
scaled ("deviance"
) residuals from the model fit similar to
residuals.glm
for Poisson or NegBin GLM's.
Author(s)
Michaela Paul and Sebastian Meyer
References
Meyer, S., Held, L. and Höhle, M. (2017): Spatio-temporal analysis of epidemic phenomena using the R package surveillance. Journal of Statistical Software, 77 (11), 1-55. doi:10.18637/jss.v077.i11
See Also
the plot
and update
methods
for fitted "hhh4"
models.