prepare data for repeated iteration process
prepare_data(
data,
group = NULL,
subject = "SIC",
sex = NULL,
value = "value",
age = "age",
x2 = "x2",
lb = -Inf,
ub = Inf
)
list of dataframes containing the columns group, subject, sex, age, value; one dataframe for every level of sex
dataframe containing measurement values, age, sex, and subject identifier
optional variable indicating groups of subjects within the data frame in most cases (families)
subject identifier
column containing the sex (or any other stratum), ideally of type character, iteration process will run on each of the levels separately
numeric column containing the measurement values
numeric column containing the age
numeric column containing a second covariate
optional - lower bound for age
optional - upper bound for age
Mandy Vogel
given a dataframe, the column name of the subject identifier, sex, age, value and group colums, the function creates a dataframe containing only these five columns with the standard column names group, subject, sex, age, value. lines containing missing values are removed.