BaşlayınÜcretsiz Başlayın

Splitting your dataset

During the measure development process, it's important to conduct EFA and CFA on separate datasets because using the same dataset can lead to inflated model fit statistics. Instead, you can split your dataset in half, then use one half for the EFA and the other half for the CFA.

Bu egzersiz

Factor Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Split the dataset in half using two sets of indices to determine which rows belong to each dataset.
  • Use the first set of indices to create a dataset for your EFA, then use the second set for your CFA dataset.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Establish two sets of indices to split the dataset
N <- nrow(gcbs)
indices <- seq(1, ___)
indices_EFA <- sample(indices, floor((.5*___)))
indices_CFA <- indices[!(indices %in% ___)]

# Use those indices to split the dataset into halves for your EFA and CFA
gcbs_EFA <- gcbs[___, ]
gcbs_CFA <- gcbs[___, ]
Kodu Düzenle ve Çalıştır