reg_glm<-reg(data = diabetes, x = c(1:4, 6), y = 5, factor = c(1, 3, 4), model = 'glm')
## subset result like a list
reg_glm$detail
reg_glm$dataframe
reg_glm[2]
reg_glm$detail[2:4]
## other methods
reg(data = diabetes, x = c(1, 3:6), y = 10, factor = c(1, 3, 4), model = 'lm')
reg(data = diabetes, x = c( "sex","education","BMI"), y = "diabetes",
time ="age", factor = c("sex","smoking","education"), model = 'coxph')
Run the code above in your browser using DataLab