First, I’ll create a backup just in case I need to return to the original version of this ds.
Then, I’ll fix names/labels issues
## ds$gender n percent valid_percent
## 1 13150 5.823738e-01 0.5823996
## 2 9429 4.175819e-01 0.4176004
## NA 1 4.428698e-05 NA
The new dataset will be named as ds_oregon. This dataset is formed of 16306 children.
## ds_oregon$gender n percent
## 1 9514 0.5834662
## 2 6792 0.4165338
Before the analyses, unfortuntaly, SPSS labels and R coding do not get along.
## # A tibble: 8 x 7
## # Groups: age2 [8]
## age2 cm_total gm_total fm_total cg_total ps_total n
## <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <int>
## 1 6 -0.389 -0.206 -0.290 -0.322 -0.315 2127
## 2 12 -0.345 -0.106 -0.332 -0.341 -0.355 2142
## 3 18 -0.468 -0.277 -0.431 -0.421 -0.521 2097
## 4 24 -0.449 -0.341 -0.471 -0.569 -0.554 1771
## 5 30 -0.483 -0.299 -0.425 -0.489 -0.490 1510
## 6 36 -0.605 -0.387 -0.496 -0.579 -0.632 2413
## 7 48 -0.519 -0.376 -0.461 -0.500 -0.550 2545
## 8 60 -0.499 -0.389 -0.437 -0.382 -0.577 1701
## risk_asq3 0 1 Total
## 0 80.9% (6299) 19.1% (1483) 100.0% (7782)
## 1 43.8% (2183) 56.2% (2797) 100.0% (4980)
## Total 66.5% (8482) 33.5% (4280) 100.0% (12762)
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 6299 1483
## 1 2183 2797
##
## Accuracy : 0.7127
## 95% CI : (0.7048, 0.7206)
## No Information Rate : 0.6646
## P-Value [Acc > NIR] : < 2.2e-16
##
## Kappa : 0.3807
##
## Mcnemar's Test P-Value : < 2.2e-16
##
## Sensitivity : 0.6535
## Specificity : 0.7426
## Pos Pred Value : 0.5616
## Neg Pred Value : 0.8094
## Prevalence : 0.3354
## Detection Rate : 0.2192
## Detection Prevalence : 0.3902
## Balanced Accuracy : 0.6981
##
## 'Positive' Class : 1
##
## risk_asqse 0 1 Total
## 0 66.7% (8478) 8.3% (4) 66.5% (8482)
## 1 33.3% (4236) 91.7% (44) 33.5% (4280)
## Total 100.0% (12714) 100.0% (48) 100.0% (12762)
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 8478 4
## 1 4236 44
##
## Accuracy : 0.6678
## 95% CI : (0.6595, 0.6759)
## No Information Rate : 0.9962
## P-Value [Acc > NIR] : 1
##
## Kappa : 0.013
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.916667
## Specificity : 0.666824
## Pos Pred Value : 0.010280
## Neg Pred Value : 0.999528
## Prevalence : 0.003761
## Detection Rate : 0.003448
## Detection Prevalence : 0.335371
## Balanced Accuracy : 0.791745
##
## 'Positive' Class : 1
##
## risk_asq3 0 1 Total
## 0 60.6% (9849) 10.9% (7) 60.4% (9856)
## 1 39.4% (6393) 89.1% (57) 39.6% (6450)
## Total 100.0% (16242) 100.0% (64) 100.0% (16306)
## Confusion Matrix and Statistics
##
## Reference
## Prediction 0 1
## 0 9849 7
## 1 6393 57
##
## Accuracy : 0.6075
## 95% CI : (0.6, 0.615)
## No Information Rate : 0.9961
## P-Value [Acc > NIR] : 1
##
## Kappa : 0.0098
##
## Mcnemar's Test P-Value : <2e-16
##
## Sensitivity : 0.890625
## Specificity : 0.606391
## Pos Pred Value : 0.008837
## Neg Pred Value : 0.999290
## Prevalence : 0.003925
## Detection Rate : 0.003496
## Detection Prevalence : 0.395560
## Balanced Accuracy : 0.748508
##
## 'Positive' Class : 1
##