Function to fit the naive models to the data of each one of the subgroups.
naive( resp, trt, subgr, data, resptype = c("survival","binary"), status =NULL)
Arguments
resp: (string)
the response variable name.
trt: (string)
the treatment variable name. The treatment variable must be a factor with 2 levels where the first level is the control and the second one the treatment.
subgr: (character)
vector with the name of the subgrouping variables. These variables have to be factor variables with the subgroups as levels.
data: (data frame)
the data frame with the variables.
resptype: (string)
the type of data used. Can be "survival" or "binary".
status: (string)
only for "survival" resptype, the status variable name in survival data.