# NOT RUN {
# stepwise forward regression
model <- glm(honcomp ~ female + read + science, data = hsb2,
family = binomial(link = 'logit'))
blr_step_p_forward(model)
# stepwise forward regression plot
model <- glm(honcomp ~ female + read + science, data = hsb2,
family = binomial(link = 'logit'))
k <- blr_step_p_forward(model)
plot(k)
# final model
k$model
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab