lcpred: Create Dataframe to Predict hlme Outcome

Description Usage Arguments Value

View source: R/lcplot.R

Description

This funciton creates dataframes that are used by the predictY function in the lcmm package to plot hlme models

Usage

1
lcpred(df, age_vars, fixcov = NULL)

Arguments

df

dataframe create used to model the data. Should be created by lcmem_prep fucntion

age_vars

if only one age variable was used character string of that varaible name. If two or more age variables were used, character vector where each element is the name of the age varaible. The first element be the first order age term (ie. c("age_wk", "age_wk^2"))

fixcov

default is null. Named vector of nontime-dependent covariates included in the the model. The names of the entries corresponds to the name of the variable and the value of the entries corresponds to group that we would like to predict.

Value

a dataframe with age varaibles scaled and not scaled ("_ns"), and time-independent covariates to use for lcmm::predY function


wfmueller29/trajpkg documentation built on Feb. 6, 2022, 3:45 a.m.