# Four cognitive tests from the Holzinger and Swineford (1939) study
# (301 children in two schools).
hs_tests <- holzinger_swineford[, c("t1_visual_perception", "t2_cubes",
"t4_lozenges",
"t6_paragraph_comprehension")]
descriptives(hs_tests)
# Include a correlation matrix (useful during scale development).
descriptives(hs_tests, correlations = TRUE)
# Mixed-type data: numeric summaries for the test scores, and
# type = "factor" (with NA numeric columns) for school.
descriptives(holzinger_swineford[, c("school", "t1_visual_perception",
"t2_cubes")])
# Data with missing values: the revised paper form board and flags tests
# were administered only in the Grant-White school, so 156 of the 301
# children have no score. Per-variable N and missingness are reported.
hs_partial <- holzinger_swineford[, c("t1_visual_perception",
"t25_paper_form_board_r",
"t26_flags")]
descriptives(hs_partial)
# The same data with listwise deletion applied first.
descriptives(hs_partial, listwise = TRUE)
Run the code above in your browser using DataLab