Calculate average and final live weights by cohort
Source:R/core_model_weights.R
calc_avg_weights.RdCalculates the average and final live weight for a given sex–age cohort based on initial weight, potential final weight, slaughter weight, and the offtake rate.
Usage
calc_avg_weights(
cohort_short,
live_weight_cohort_initial,
live_weight_cohort_potential_final,
live_weight_cohort_at_slaughter,
offtake_rate
)Arguments
- cohort_short
Character. Sex-specific cohort code describing the age and/or the production stage of the animals. Supported values include:
FA: adult females (from age at first parturition)FS: sub-adult females (from weaning to age at first parturition)FJ: juvenile females (from birth to weaning)MA: adult males (from age at first breeding)MS: sub-adult males (from weaning to age at first breeding)MJ: juvenile males (from birth to weaning)FN: non-demographic femalesMN: non-demographic males
- live_weight_cohort_initial
Numeric. Live weight at the beginning of the cohort stage (kg).
- live_weight_cohort_potential_final
Numeric. Potential final live weight attainable at the end of the cohort stage in the absence of offtake (kg). (For juveniles: equals weaning weight; For subadults: equals adult live weight; For adults: equals adult live weight)
- live_weight_cohort_at_slaughter
Numeric. Live weight at slaughter for animals removed from the cohort (kg).
- offtake_rate
Numeric. Annual proportion of animals removed from the herd for each sex-age cohort (fraction).
Value
A named list with:
- live_weight_cohort_average
Numeric. Average live weight over the cohort stage. Computed by accounting for the share of offtaken animals within the cohort, using their slaughter weight, and the potential final weight of animals that remain in the cohort (kg).
- live_weight_cohort_final
Numeric. Live weight at the end of the cohort stage, accounting for both surviving and offtaken animals. Computed as a weighted average of the potential final weight of surviving animals and the slaughter weight of offtaken animals, based on the offtake rate (kg).
Details
The calculation of live_weight_cohort_average and live_weight_cohort_final is performed considering that
a fraction of animals is removed (offtake) during the cohort stage, while the
remaining animals reach the potential final live weight.
For nondemographic cohorts (FN, MN), offtake_rate is
not used; live_weight_cohort_final is set equal to
live_weight_cohort_potential_final.
The final live weight is computed as: $$ live\_weight\_cohort_final = (1 - offtake\_rate) \times live\_weight\_cohort\_potential\_final + offtake\_rate \times live\_weight\_cohort\_at\_slaughter $$
The average live weight over the stage is approximated as: $$live\_weight\_cohort\_average = (live\_weight\_cohort\_initial + live\_weight\_cohort\_final)/2$$
This function is part of the run_weights_module().