MAP fit object
MAP fit object
Super class
BayesRTMB::RTMB_Fit_Base -> map_fit
Public fields
modelThe `RTMB_Model` object used for estimation.
par_vecParameter vector on the unconstrained scale (constrained values unlisted).
parParameter list on the constrained scale.
par_uncParameter vector on the unconstrained scale (raw unconstrained values).
ci_methodMethod used for CI estimation ("wald", "sampling", or "none").
objectiveRTMB objective function object.
log_mlLog marginal likelihood or related model criterion.
convergenceOptimizer convergence code.
sd_repStandard deviation report object.
df_fixedSummary table for fixed-effect parameters.
random_effectsRandom effect estimates.
df_transformSummary table for transformed parameter estimates.
df_generateSummary table for generated quantity estimates.
opt_historyA vector of optimize objective history.
transformList of transformed parameters maintaining their original dimensions.
generateList of generated quantities maintaining their original dimensions.
se_samplesList of simulated samples for standard error estimation.
laplaceLogical; whether Laplace approximation was used.
vcov_uncVariance-covariance matrix of parameters in unconstrained space.
mapList; the parameter mapping used.
marginal_varsCharacter vector of parameter names requested through `optimize(marginal = ...)`.
laplace_random_varsCharacter vector of all parameter names passed to `MakeADFun(random = ...)` during Laplace approximation.
idx_fix_activeNumeric vector; mapping between active parameters and full unconstrained vector.
show_dfLogical; whether to display degrees of freedom in the summary output.
viewCharacter vector of parameter names to prioritize in summary.
fallback_neededLogical; whether Hessian/SE fallback was used during optimization.
Methods
Method new()
Create a new `MAP_Fit` object.
Usage
MAP_Fit$new(
model,
par_vec = NULL,
par = NULL,
objective = NULL,
log_ml = NULL,
convergence = NULL,
sd_rep = NULL,
df_fixed = NULL,
random_effects = NULL,
df_transform = NULL,
df_generate = NULL,
opt_history = NULL,
transform = NULL,
generate = NULL,
se_samples = NULL,
par_unc = NULL,
ci_method = "wald",
laplace = TRUE,
map = NULL,
vcov_unc = NULL,
marginal_vars = NULL,
laplace_random_vars = NULL,
idx_fix_active = NULL,
show_df = TRUE,
view = NULL,
fallback_needed = NULL
)Arguments
modelThe `RTMB_Model` object used for estimation.
par_vecParameter vector on the unconstrained scale (constrained values unlisted).
parParameter list on the constrained scale.
objectiveThe objective function value at the optimum.
log_mlLog marginal likelihood.
convergenceOptimizer convergence code.
sd_repThe `sdreport` object from TMB.
df_fixedData frame of fixed effects estimates and CIs.
random_effectsData frame of random effects estimates and CIs.
df_transformData frame of transformed parameters.
df_generateData frame of generated quantities.
opt_historyData frame of optimization history.
transformList of transformed parameters maintaining their original dimensions.
generateList of generated quantities maintaining their original dimensions.
se_samplesList of simulated samples for standard error estimation.
par_uncParameter vector on the unconstrained scale (raw values).
ci_methodMethod used for CI estimation ("wald", "sampling", or "none").
laplaceLogical; whether Laplace approximation was used.
mapList; the parameter mapping used.
vcov_uncVariance-covariance matrix of parameters in unconstrained space.
marginal_varsCharacter vector of parameter names requested through `optimize(marginal = ...)`.
laplace_random_varsCharacter vector of all parameter names passed to `MakeADFun(random = ...)` during Laplace approximation.
idx_fix_activeNumeric vector; mapping between active parameters and full unconstrained vector.
show_dfLogical; whether to display degrees of freedom in the summary output. Default is TRUE.
viewCharacter vector of parameter names to prioritize in summary.
fallback_neededLogical; whether Hessian/SE fallback was used during optimization.
Method draws()
Extract samples from the asymptotic posterior distribution.
Usage
MAP_Fit$draws(
pars = NULL,
inc_random = FALSE,
inc_transform = TRUE,
inc_generate = TRUE,
...
)Method summary()
Summarize MAP estimates.
Arguments
parsCharacter vector specifying the names of parameters to summarize. If NULL, all available parameters are summarized.
max_rowsMaximum number of rows to print in summaries. Default is 10.
digitsNumber of digits to print.
ranefLogical; whether to also display random effect estimates. Default is FALSE.
viewCharacter vector of parameter names to prioritize or filter by.
Method print()
Print a brief summary of the fitted object.
Method generated_quantities()
Compute generated quantities from the MAP estimate.
Method profile()
Calculate Profile Likelihood confidence intervals for specific parameters.
Usage
MAP_Fit$profile(
pars = NULL,
level = 0.95,
trace = FALSE,
digits = 5,
show_plot = FALSE,
quiet = FALSE,
jacobian = "none",
...
)Arguments
parsCharacter vector of parameter names to profile. If NULL, all fixed parameters are profiled.
levelConfidence level (default is 0.95).
traceLogical; whether to print profiling progress. Default is FALSE.
digitsInteger; number of decimal places to print. Default is 5.
show_plotLogical; whether to plot the profile likelihood curves. Default is FALSE.
quietLogical; whether to suppress text output. Default is FALSE.
jacobianCharacter; "none" (default), "random", or "all". Whether to include Jacobian adjustments for transformations.
...Additional arguments passed to TMB::tmbprofile (e.g., ytol).