import { anthro_zscore_adjusted, compute_zscore } from './z-score-helper'; // ' Length-for-age zscore indicator // ' // ' @param lenhei numeric, the standardized length/height measure in cm. No further modification is done // ' @param age_in_days integer, the age in days. // ' @param age_in_months numeric, the age in months. // ' @param sex integer, the sex where 1 is male and 2 is female // ' @param flag_threshold numeric, a length 1 threshold. If the absolute value of the z-score is greater than // ' this parameter, the z-score gets flagged in the resulting data frame. // ' @param growthstandards data.frame, the growstandards table for the length-for-age indicator. // ' Do not change unless you know what you are doing. // ' @include z-score-helper.R // ' @noRd type length_for_age = { lenhei?: number, age_in_days: number, age_in_months: number, sex: 1 | 2, flag_threshold?: number, growthstandards?: string } export default function anthro_zscore_length_for_age({ lenhei, age_in_days, age_in_months, sex, flag_threshold = 6, growthstandards = 'lenanthro', }: length_for_age): ReturnType { return anthro_zscore_adjusted({ name: 'len', measure: lenhei, age_in_days, age_in_months, sex, growthstandards, flag_threshold, allowed_age_range: [0, 1856], zscore_fun: compute_zscore, }); }