wg2ws_get_cat_function: Get function for category/age combination

View source: R/wg2ws_get_cat_function.R

wg2ws_get_cat_functionR Documentation

Get function for category/age combination

Description

Returns a model object to predict category score given category and age.

Usage

wg2ws_get_cat_function(the_category, age = TRUE, echo_only = FALSE)

Arguments

the_category

Which category to use, following Wordbank naming convention. Options: sounds, animals, vehicles, toys, food_drink, clothing, body_parts, household, furniture_rooms, outside, places, people, games_routines, action_words, descriptive_words, time_words, pronouns, question_words, locations, quantifiers, helping_verbs, connecting_words

age

T/F. If TRUE, return model that uses age as predictor.

echo_only

T/F. If FALSE, returns model as function; if TRUE echoes as human readable.

Details

This is mostly an internal function, but is exposed in case somebody needs it. Returns a lm() object that has had the embedded data stripped, given a category and whether to model age.

Value

Function or NULL

References

Day, T. K. M., Borovsky, A., Thal, D., & Elison, J. T. (2025). Modeling Longitudinal Trajectories of Word Production With the CDI. Developmental Science, 28(4), e70036. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/desc.70036")}

Examples

wg2ws_get_cat_function("time_words", age = TRUE)


cdiWG2WS documentation built on June 17, 2025, 9:10 a.m.