File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -402,8 +402,8 @@ We then select the variables that are not 0 and create our final model. We can d
402402
403403``` r
404404selected_vars <- rownames(coefs )[which(coefs != 0 )][- 1 ]
405- alzheimer_selected <- as.matrix( alzheimerTrain [, selected_vars ])
406- glm_fit <- glm(alzheimerTrain $ diagnosis ~ alzheimer_selected , family = " binomial" )
405+ alzheimer_selected <- alzheimerTrain [, selected_vars ])
406+ glm_fit <- glm(diagnosis ~ alzheimer_selected , family = " binomial" )
407407```
408408
409409And then we have a look at the results
@@ -412,7 +412,7 @@ And then we have a look at the results
412412summary(glm_fit )
413413```
414414
415- We see that the coefficients for the selected columns are not alll significant. Why ?
415+ We see that the coefficients for the selected columns are not all significant. Why ?
416416
417417We will now use the caret package to have results for performance as well as model optimization.
418418
You can’t perform that action at this time.
0 commit comments