update {dpm} | R Documentation |
Various methods for dpm
objects
Description
R likes it when these things have documentation.
Usage
update(object, ...)
## S3 method for class 'dpm'
update(object, formula., ..., evaluate = TRUE)
## S4 method for signature 'dpm'
update(object, formula., ..., evaluate = TRUE)
## S4 method for signature 'dpm'
show(object)
coef(object, ...)
## S3 method for class 'dpm'
coef(object)
## S4 method for signature 'dpm'
coef(object)
## S4 method for signature 'dpm'
formula(x)
Arguments
object |
A |
... |
Other arguments to update. |
formula. |
An updated formula (optional) |
evaluate |
If updating, should the updated model be updated or just return the call? Default is TRUE, re-run the model. |
x |
A |
Value
update.dpm()
: Returns an updated dpm
object.
coef.dpm()
: Returns a numeric vector of coefficients. If the model
was fit with x.free = TRUE
and/or y.free = TRUE
, the coefficient
names will be formatted with an underscore and the wave corresponding to
which time period the coefficient is estimated for.
formula.dpm()
: Returns the formula used to fit the model as a
Formula
object. The formula is the input to dpm()
, not the lavaan
syntax.
show.dpm()
: Returns an invisible "NULL" while printing model info
to console.
Examples
data("WageData", package = "panelr")
wages <- panel_data(WageData, id = id, wave = t)
fit <- dpm(wks ~ pre(lag(union)) + lag(lwage), data = wages)
# Re-run model without `lag(lwage)` term
update(fit, . ~ . - lag(lwage))