The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
score_le8() now scores children aged 4 months to 19
years with the pediatric LE8 definitions (Table 1 and Supplemental
Appendix 2 of the 2022 advisory). Rows are routed by age,
so adults and children can be scored in one call, and the new
le8_population column records which definitions were used.
Components AHA does not define at a child’s age (for example, blood
pressure before age 1) are NA and are excluded from
min_components.milk_source at 6-23 months: 6 items at 6-23 months, 10
items at 2-5 years (10 points per item), and all 16 items with adult
bands from age 6. mepa_total reports items met on the
age-appropriate screener.age_months,
milk_source, active_play_minutes,
bmi_percentile, bmi_percent_of_p95,
infant_weight_percentile,
infant_weight_z_change, and the AAP 2017 blood-pressure
references systolic_bp_p90, systolic_bp_p95,
diastolic_bp_p90, and diastolic_bp_p95.add_pediatric_references() derives the growth-chart
and blood-pressure reference inputs from sex, age, height, and weight
using the suggested packages cdcanthro and pedbp.vignette("pediatric-scoring").score_le8() results now carry the class
essential8_scores on top of the input’s class (data frames,
tibbles, and grouped tibbles are otherwise unchanged), with new methods:
summary() reports the number of rows scored, the
distribution of the composite and each component score, and the
cardiovascular health categories.tidy() reshapes the scores into long format, one row
per input row and measure. tidy() is re-exported from
generics.plot() draws the mean scores, their distributions
(type = "distribution"), or a histogram of the composite
score by category (type = "composite") with ggplot2.
type = "forest" draws the mean scores with confidence
intervals, optionally compared across the groups in by,
using ggforestplotR::ggforestplot(); other arguments to
plot() are passed on to ggforestplot().summarise() (or summarize())
without expressions returns the summary() statistics as a
data frame, by group with .by. Summaries with expressions
are handled by dplyr as before.score_le8(impute = TRUE) imputes missing inputs, scores
every imputed data set, and returns them stacked with an
.imp column. summary(),
summarise(), tidy(), and plot()
on the result pool across imputations with Rubin’s rules.le8_imputation_control() sets the number of
imputations, iterations, a seed, auxiliary predictors, and other
mice::mice() arguments:
score_le8(impute = le8_imputation_control(m = 50, seed = 1)).le8_imputation_setup() shows these settings, and
score_le8_imputed() scores a mice run of your own.vignette("case-study") works through a complete
project: scoring 500 simulated children and adults, choosing
min_components, imputing missing laboratory values, and
summarizing and plotting the results.as_le8_scores() restores the
essential8_scores class to scored data after
group_by(), as_tibble(), or reading saved
results.le8_ prefix:
they are now diet_score,
physical_activity_score, nicotine_score,
sleep_score, bmi_score,
blood_lipids_score, blood_glucose_score, and
blood_pressure_score. le8_n_components is now
n_components. Columns that describe the LE8 composite keep
the prefix: le8_composite_score, le8_complete,
le8_category, and le8_population.data that already
contains one of the new names (for example, a sleep_score
from another instrument) or one of the old le8_-prefixed
names now raises an error. Rename those columns before scoring.score_le8() as the call rather than
an internal helper.score_le8(). Both
methods accept raw food and nutrient inputs, existing diet scores, or
percentiles (#9).dash_total or
hei2015_total. HEI-2015 also returns all 13 component
scores.glucose_measure is no
longer scored as though glucose_value were HbA1c; the
glucose score is now missing.apply_lean_muscular_bmi_override = TRUE no longer
awards 100 BMI points when bmi or bmi_profile
is missing.apply_lean_muscular_bmi_override and
apply_prediabetes_metformin_penalty now blank a score only
for records where the adjustment could apply.NA
(such as blank CSV columns) are treated as missing instead of raising a
type error.le8_physical_activity_score is now always double,
including when activity inputs are entirely missing.score_le8() now returns an object of the same class as
data, so tibbles and grouped tibbles are preserved.BMI) now raise an error instead
of being ignored.mepa_columns now requires
diet_method = "mepa", and dash or
hei2015 index columns are rejected under
diet_method = "percentile".dash_<field>_score component scores, matching the raw
HEI-2015 output.diet_value column no longer blocks
scoring of a dash or hei2015 index
column.female column is accepted as the MEPA sex
field.score_le8() can now work with data that have missing
values (#7).min_components, an argument to control how many
available components are required for le8_composite_score.
Valid options range from 1-8.le8_n_components and le8_complete
outputs for transparent reporting of the available components for LE8
composite scores.min_components impossible
to reach.score_le8() for complete adult records aged 20
years or older, using the eight component definitions in the AHA 2022
Presidential Advisory.mepa_total, and population-percentile diet
scoring.score_le8() to take one scalar
diet_method argument per call, defaulting to
"mepa"; percentile calls require diet_value,
and data using both methods must be scored in separate calls.le8_score to
le8_composite_score.m/f and male/female,
plus numeric or character 0/1 (0
is male and 1 is female). The default field is
sex, female is recognized when
sex is absent, and other field names can be supplied
through mepa_columns.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.