naive {bonsaiforest} | R Documentation |
Naive Model Estimation
Description
Function to fit the naive models to the data of each one of the subgroups.
Usage
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.
|
Value
List with fit
, estimates
, model
, resptype
, data
.
Examples
naive("tt_pfs", "arm", c("x_1", "x_2"), example_data, "survival", "ev_pfs")
[Package
bonsaiforest version 0.1.0
Index]