# read and save data set FC
data(FC)
write.table(FC,paste0(tempdir(),'/','my_data.dat'),quote=FALSE, sep=" ",
col.names = FALSE, row.names = FALSE)
# set seed and define blocks
set.seed(1)
blocks <- matrix(sample(1:15,15), ncol = 3)
# define the item-to-factor relation
itf <- rep(1:3,5)
# perform analysis
if (FALSE) {
fit.mplus(blocksort(blocks),itf,'irt',data_path = 'mydata.dat', data_full = TRUE,
input_path = paste0(tempdir(),'/','myFC_model'))
# After estimation
read.mplus(blocks,itf,'irt',output_path = paste0(tempdir(),'/','myFC_model.out'))
}
Run the code above in your browser using DataLab