I am trying to simulate a dataset using Parallel Latent CTT model and this is what i have done so far:
(START) #Importing psych library for all the simulation related functions library(psych) # Settting the working directory path to C:/NCME path="C:/NCME" setwd(path) #Using the function to generate the data GenData <- congeneric.sim(N=500, loads = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), short = FALSE) #Rounding upto 2 decimal places while showing the correlation matrix round(cor(GenData$observed),2) #Factor Score FactorScore=factor.pa(GenData$observed,1,scores = "TRUE", rotate="none") round(cor(FactorScore$scores,GenData$latent),2) (END) Please let me know if I am moving into the right direction, if not then, please let me know the correct way to simulate the dataset Thanks in Advance Regards, Nidhi Kohli *************************************** Nidhi Kohli, M.Ed. Doctoral Student Department of Measurement, Statistics and Evaluation University of Maryland 1230 Benjamin Building College Park, MD 20742-1115 e-mail: nid...@umd.edu ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.