Run Iterative Francis Reweighting Procedure
run_francis.RdRuns an iterative Francis reweighting procedure for pooled and population-specific fishery and survey age and length compositions. Repeatedly fits the model and updates composition weights until the specified number of iterations is reached.
Usage
run_francis(
data,
parameters,
mapping,
random = NULL,
n_francis_iter = 10,
newton_loops = 0
)Arguments
- data
A list of model input data containing observed compositions, usage flags, input sample sizes, and weight arrays for both pooled (
Wt_FishAgeComps,Wt_FishLenComps,Wt_SrvAgeComps,Wt_SrvLenComps,Wt_FishAgeComps_discard,Wt_FishLenComps_discard) and population-specific (Wt_FishAgeComps_pop,Wt_FishLenComps_pop,Wt_SrvAgeComps_pop,Wt_SrvLenComps_pop,Wt_FishAgeComps_discard_pop,Wt_FishLenComps_discard_pop) data streams.- parameters
A list of model parameters passed to
fit_model.- mapping
A list or mapping object passed to
fit_model.- random
Character vector of random effects passed to
fit_model. DefaultNULL.- n_francis_iter
Integer. Number of Francis reweighting iterations. Default
10.- newton_loops
Integer. Number of Newton refinement steps passed to
fit_model. Default0.
Value
A named list with:
objThe fitted model object from the final iteration, augmented with
$data,$parameters,$mapping,$random, and$rep.start_mean_francisMean composition fits from the first iteration, as returned by
do_francis_reweighting.end_mean_francisMean composition fits from the final iteration.
recorded_weightsLong-format dataframe of Francis weights from every iteration for all pooled and population-specific data streams, with columns
Region,Year,Seas,Sex,Fleet,Weight,Type,Pop(pooled rows havePop = NA), anditer.
See also
Other Francis Reweighting:
do_francis_reweighting()