Learn R Programming

rERR (version 0.1)

f_to_model_data: Data transformation: keep model variables and expand categorical variables (internal use)

Description

Transform the data set in a closed form n_row | id_name | n_pe | entry_name | exit_name | outcome | time | linear_covariates | loglinear_covariates. Expand if a variable is categorical to pure logical n_categories variables (excluding the reference category)

Usage

f_to_model_data(formula, data, id_name, time_name)

Arguments

formula

Surv(entry_time,exit_time,outcome)~loglin(loglin_var1,..,loglin_varn)+ lin(lin_var1,..,lin_varm)+strata(strat_var1,...strat_varp)

data

data set

id_name

name of variable containing the names of subjects

time_name

name of the time variable

Value

data set described below

Examples

Run this code
# NOT RUN {
f_to_model_data(formula,data,id_name='patientids',time_name='time')
# }

Run the code above in your browser using DataLab