Helper function for validating that all required demographic parameter matrices have been defined and that they are all of the correct dimension.

validate_dem_params(dem_params, model_dims)

Arguments

dem_params

a named list containing the demographic rate matrices. List elements must have the same names as stated above.

model_dims

a named list containing expected model dimensions. List element must be: nyears, nages, nsexes, nregions, and nfleets.

Value

unmodified dem_params object; if dem_params list is invalid, will return a descriptive error message

Details

Required demographic parameters are: mort, waa, sexrat, sel, ret, dmr, and surv_sel

Expected dimensions are: [nyears, nages, nsexes, nregions, nfleets]

Examples