HS20imps: List of imputed Holzinger & Swineford (1939) datasets

HS20impsR Documentation

List of imputed Holzinger & Swineford (1939) datasets

Description

A version of the classic Holzinger and Swineford (1939) dataset, with missing data imposed on variables x5 and x9:

Details

  • x5 is missing not at random (MNAR) by deleting the lowest 30% of x5 values.

  • x9 is missing at random (MAR) conditional on age, by deleting x5 values for the youngest 30% of subjects in the data.

The data are imputed 20 times using the syntax shown in the example. The data include only age and school variables, along with 9 tests (x1 through x9).

Author(s)

Terrence D. Jorgensen (University of Amsterdam; TJorgensen314@gmail.com)

Source

The lavaan package.

References

Holzinger, K., & Swineford, F. (1939). A study in factor analysis: The stability of a bifactor solution. Supplementary Educational Monograph, no. 48. Chicago, IL: University of Chicago Press.

See Also

lavaan::HolzingerSwineford1939

Examples

 
data(HolzingerSwineford1939, package = "lavaan")

## impose missing data for example
HSMiss <- HolzingerSwineford1939[ , c(paste("x", 1:9, sep = ""),
                                      "ageyr","agemo","school")]
set.seed(123)
HSMiss$x5 <- ifelse(HSMiss$x5 <= quantile(HSMiss$x5, .3), NA, HSMiss$x5)
age <- HSMiss$ageyr + HSMiss$agemo/12
HSMiss$x9 <- ifelse(age <= quantile(age, .3), NA, HSMiss$x9)

## impute missing data with Amelia
library(Amelia)
set.seed(456)
HS.amelia <- amelia(HSMiss, m = 20, noms = "school", p2s = FALSE)
HS20imps <- HS.amelia$imputations



lavaan.mi documentation built on April 3, 2025, 9:36 p.m.