Extract and tabulate parameter estimates and metadata from a fitted SPoRC model
get_par_est_info.RdJoins the parameter list, factor map, and sdreport to produce two
tidy data frames: one for estimated parameters (with initial values,
posterior estimates, standard errors, and absolute gradients) and one for
fixed (non-estimated) parameters. Parameter indices are re-sequenced to
match the sequential numbering used internally by RTMB's sdreport,
and map entries of NA (i.e., parameters fixed via mapping)
are labelled "NE" (not estimated).
Arguments
- parameters
Named list of parameter starting values passed to
RTMB::MakeADFun.- mapping
Named list of factor maps passed to
RTMB::MakeADFun. Parameters absent frommappingare treated as freely estimated. Elements withNAfactor levels are treated as fixed.- sd_rep
sdreportobject returned byRTMB::sdreport. Must contain$par.fixed,$par.random,$cov.fixed,$diag.cov.random, and$gradient.fixed.
Value
A named list with two elements:
est_parsData frame of estimated parameters, with columns
Par(parameter name),Est_Val(estimated value on the native scale),SE_Val(standard error),Abs_Grad_Val(absolute gradient;NAfor random effects),Init_Val(starting value), and dimension columnsDim1,Dim2, ... indicating the array indices of each element.non_est_parsData frame of non-estimated (fixed) parameters with the same dimension and
Init_Valcolumns, plusmap = "NE"indicating they were excluded from estimation.