Base class for RTMB Fit objects
Base class for RTMB Fit objects
Methods
Method estimate()
Get point estimates for parameters, transformed parameters, and generated quantities.
Arguments
parsOptional character or numeric vector of parameter names or indices to extract. Supports special keywords: "parameters", "transform", "generate", and "all".
typeCharacter string specifying the estimation type.
componentCharacter string specifying the component to filter by.
chainsNumeric vector of chains to include.
best_chainsNumber of best chains to include.
dropLogical; if TRUE and only one parameter is selected, return the value directly instead of a list.
...Additional arguments passed to draws().
Method EAP()
Calculate Expected A Posteriori (EAP) estimates from posterior samples.
Usage
RTMB_Fit_Base$EAP(
pars = "parameters",
chains = NULL,
best_chains = NULL,
drop = FALSE,
...
)Method MAP()
Calculate Maximum A Posteriori (MAP) estimates.
Usage
RTMB_Fit_Base$MAP(
pars = "parameters",
chains = NULL,
best_chains = NULL,
type = c("marginal", "joint"),
drop = FALSE,
...
)Arguments
parsOptional character vector of parameter names to extract.
chainsNumeric vector of chains to include.
best_chainsNumber of best chains to include.
typeCharacter string; "marginal" or "joint" MAP.
dropLogical; whether to drop the list if only one parameter is selected.
...Additional arguments passed to `estimate()`.
Method rotate()
Rotate sampled parameters.
Arguments
targetCharacter string specifying the target variable to base the rotation on.
referenceMatrix to rotate towards. If NULL, the target's point estimate is used.
linkedCharacter vector of variable names to be rotated in the same direction.
overwriteLogical; whether to overwrite the stored draws. If FALSE, adds to generated quantities. Default is FALSE.
suffixCharacter string to append to the rotated variable names when overwrite is FALSE. Default is "rot".
...Additional arguments passed to the rotation function.
Method fa_rotate()
Rotate factor loadings and optional factor scores.
Arguments
targetCharacter string specifying the target variable to base the rotation on.
linkedCharacter vector of variable names to be rotated in the same direction.
scoresCharacter vector of variable names to be rotated as factor scores (inverse direction).
rotateCharacter string specifying the rotation method.
...Additional arguments passed to the rotation function.