| varying_coef | R Documentation |
For a VCMM with varying coefficients \beta_k(t), k = 1, ..., K,
this function evaluates \hat\beta_k(t) at any vector of
t_new values, using the same B-spline basis the fit was built
on. Useful for diagnostic plots, predictions, and reporting; the
Day-13 plot method uses it internally.
varying_coef(object, t_new, k = NULL, se.fit = FALSE, ...)
object |
A |
t_new |
Numeric vector at which to evaluate. Same scale as the
original |
k |
Integer vector of which varying coefficients to evaluate
(1-based). Default |
se.fit |
Logical. If |
... |
Unused. |
The constant intercept \hat\beta_0 is not returned (it
does not vary in t); use fixef(fit)\$intercept
for that.
Pointwise standard errors are available via se.fit = TRUE,
computed as
\mathrm{SE}(\hat\beta_k(t)) =
\sqrt{B(t)^\top \widehat{\mathrm{Var}}(\beta_{(k)})\, B(t)}
where \beta_{(k)} is the basis-coefficient sub-vector for
coefficient k and the covariance comes from
vcov(object, which = "beta").
Either a numeric matrix (length(t_new) by
length(k), default), or a list with components fit
and se.fit when se.fit = TRUE.
fixef.vcmm_fit, coef.vcmm_fit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.