glm_weightit-methods | R Documentation |
glm_weightit()
objectsThis page documents methods for objects returned by
glm_weightit()
, lm_weightit()
, ordinal_weightit()
,
multinom_weightit()
, and coxph_weightit()
. predict()
methods are
described at predict.glm_weightit()
and anova()
methods are described at
anova.glm_weightit()
.
## S3 method for class 'glm_weightit'
summary(object, ci = FALSE, level = 0.95, transform = NULL, vcov = NULL, ...)
## S3 method for class 'multinom_weightit'
summary(object, ci = FALSE, level = 0.95, transform = NULL, vcov = NULL, ...)
## S3 method for class 'ordinal_weightit'
summary(
object,
ci = FALSE,
level = 0.95,
transform = NULL,
thresholds = TRUE,
vcov = NULL,
...
)
## S3 method for class 'coxph_weightit'
summary(object, ci = FALSE, level = 0.95, transform = NULL, vcov = NULL, ...)
## S3 method for class 'glm_weightit'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'glm_weightit'
vcov(object, complete = TRUE, vcov = NULL, ...)
## S3 method for class 'glm_weightit'
estfun(x, asympt = TRUE, ...)
## S3 method for class 'glm_weightit'
update(object, formula. = NULL, ..., evaluate = TRUE)
object , x |
an output from one of the above modeling functions. |
ci |
|
level |
when |
transform |
the function used to transform the coefficients, e.g., |
vcov |
either a string indicating the method used to compute the
variance of the estimated parameters for |
... |
for |
thresholds |
|
digits |
the number of significant digits to be
passed to |
complete |
|
asympt |
|
formula. |
changes to the model formula, passed to the |
evaluate |
whether to evaluate the call ( |
vcov()
by default extracts the parameter covariance matrix already
computed by the fitting function, and summary()
and confint()
uses this
covariance matrix to compute standard errors and Wald confidence intervals
(internally calling confint.lm()
), respectively. Supplying arguments to
vcov
or ...
will compute a new covariance matrix. If cluster
was
supplied to the original fitting function, it will be incorporated into any
newly computed covariance matrix unless cluster = NULL
is specified in
vcov()
, summary()
, or confint()
. For other arguments (e.g., R
and
fwb.args
), the defaults are those used by glm_weightit()
. Note that for
vcov = "BS"
and vcov = "FWB"
(and vcov = "const"
for
multinom_weightit
or ordinal_weightit
objects), the environment for the
fitting function is used, so any changes to that environment may affect
calculation. It is always safer to simply recompute the fitted object with a
new covariance matrix than to modify it with the vcov
argument, but it can
be quicker to just request a new covariance matrix when refitting the model
is slow.
update()
updates a fitted model object with new arguments, e.g., a new
model formula, dataset, or variance matrix. When only arguments that control
the computation of the variance are supplied, only the variance will be
recalculated (i.e., the parameters will not be re-estimated). When data
is
supplied, weightit
is not supplied, and a weightit
object was originally
passed to the model fitting function, the weightit
object will be re-fit
with the new dataset before the model is refit using the new weights and new
data. That is, calling update(obj, data = d)
is equivalent to calling
update(obj, data = d, weightit = update(obj$weightit, data = d))
when a
weightit
object was supplied to the model fitting function. Similarly,
supplying s.weights
or weights
passes the argument through to
weightit()
to be refit. When s.weights
or weights
are supplied and no
weightit
object is present, a fake one containing just the supplied weights
will be created.
estfun()
extracts the empirical estimating functions for the fitted model, optionally accounting for the estimation of the weights (if available). This, along with bread()
, is used by sandwich::sandwich()
to compute the robust covariance matrix of the estimated coefficients. See glm_weightit()
and vcov()
above for more details.
summary()
returns a summary.glm_weightit()
object, which has its
own print()
method. For coxph_weightit()
objects, the print()
and
summary()
methods are more like those for glm
objects than for coxph
objects.
Otherwise, all methods return the same type of object as their generics.
glm_weightit()
for the page documenting glm_weightit()
,
lm_weightit()
, ordinal_weightit()
, multinom_weightit()
, and
coxph_weightit()
. summary.glm()
, vcov()
, confint()
for the relevant
methods pages. predict.glm_weightit()
for computing predictions from the
models. anova.glm_weightit()
for comparing models using a Wald test.
sandwich::estfun()
and sandwich::bread()
for the estfun()
and bread()
generics.
## See more examples at ?glm_weightit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.