View source: R/trim-pred-data.R
dh.trimPredData | R Documentation |
This is to be used in conjuncture with ds.predictLmer
. The new data frame
used for prediction may contain age or time values not present in the
original data. This allows you to remove all predicted values beyond a
minimum and maximum age. This ensures that plots only show predict values
over a range where there was actually data.
dh.trimPredData(
pred = NULL,
coh_names = NULL,
age = "age",
min = NULL,
max = NULL
)
pred |
Tibble of predicted values returned by dh.predictLmer. |
coh_names |
Character Vector of cohort names corresponding to cohorts
included in |
age |
Character specifying name of the age variable in |
min |
Vector of minimum values of age with length equal to number of
cohorts in |
max |
Vector of maximum values of age with length equal to number of
cohorts in |
pred
is returned as a tibble with predicted values outside of
min
and max
removed.
Other trajectory functions:
dh.lmeMultPoly()
,
dh.makeAgePolys()
,
dh.makeLmerForm()
,
dh.predictLmer()
,
dh.zByGroup()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.