dynamitefit Object as a Data TableProvides a data.table representation of the posterior samples of the model
parameters. See as.data.frame.dynamitefit() for details.
# S3 method for dynamitefit
as.data.table(
x,
keep.rownames = FALSE,
row.names = NULL,
optional = FALSE,
types = NULL,
parameters = NULL,
responses = NULL,
times = NULL,
groups = NULL,
summary = FALSE,
probs = c(0.05, 0.95),
include_fixed = TRUE,
...
)A data.table containing either samples or summary statistics of
the model parameters.
[dynamitefit]
The model fit object.
[logical(1)]
Not used.
Ignored.
Ignored.
[character()]
Type(s) of the parameters for which the
samples should be extracted. See details of possible values. Default is
all values listed in details except spline coefficients omega.
This argument is mutually exclusive with parameters.
[character()]
Parameter(s) for which the samples
should be extracted. Possible options can be found with function
get_parameter_names(). Default is all parameters of specific type for
all responses. This argument is mutually exclusive with types.
[character()]
Response(s) for which the samples
should be extracted. Possible options are elements of
unique(x$priors$response), and the default is this entire vector.
Ignored if the argument parameters is supplied.
omega_alpha, and omega_psi. See also get_parameter_types().
[double()]
Time point(s) to keep. If NULL
(the default), all time points are kept.
[character()] Group name(s) to keep. If NULL
(the default), all groups are kept.
[logical(1)]
If TRUE, returns posterior
mean, standard deviation, and posterior quantiles (as defined by the
probs argument) for all parameters. If FALSE (default), returns the
posterior samples instead.
[numeric()]
Quantiles of interest. Default is
c(0.05, 0.95).
[logical(1)]
If TRUE (default), time-varying
parameters for 1:fixed time points are included in the output as NA
values. If FALSE, fixed time points are omitted completely
from the output.
Ignored.
Model outputs
as.data.frame.dynamitefit(),
as_draws_df.dynamitefit(),
coef.dynamitefit(),
confint.dynamitefit(),
dynamite(),
get_code(),
get_data(),
get_parameter_dims(),
get_parameter_names(),
get_parameter_types(),
ndraws.dynamitefit(),
nobs.dynamitefit()
data.table::setDTthreads(1) # For CRAN
as.data.table(
gaussian_example_fit,
responses = "y",
types = "beta",
summary = FALSE
)
Run the code above in your browser using DataLab