Hello evryone!
I'm very new to this type of analysis and I've been trying to run the common factor GWAS on two traits of interest, but I keep running into this error:
PSYCH_factor <- userGWAS(covstruc = LDSCoutput, SNPs = PSYCH_sumstats, estimation = "DWLS", model = commonfactor.model1, printwarn = TRUE, cores = 30, parallel = TRUE, smooth_check = TRUE, std.lv = TRUE, fix_measurement = TRUE)
[1] "Please note that an update was made to userGWAS on Sept 1 2023 so that the default behavior is to fix the measurement model using the fix_measurement argument."
Error in lav_fit_gfi(WLS.obs = WLS.obs, WLS.est = WLS.est, WLS.V = WLS.V, :
non-conformable arguments
My LDSCoutput is as follows:
LDSCoutput
$V
[,1] [,2] [,3]
[1,] 9.243286e-05 2.820133e-05 1.960367e-05
[2,] 2.820133e-05 1.152835e-04 3.987369e-05
[3,] 1.960367e-05 3.987369e-05 4.337307e-04
$S
trait1 trait2
[1,] 0.20307699 0.09408977
[2,] 0.09408977 0.24121583
$I
[,1] [,2]
[1,] 1.0255753 0.2674015
[2,] 0.2674015 1.0080115
$N
[,1] [,2] [,3]
[1,] 89042.57 43652.53 21187.8
$m
[1] 1173569
The model I'm trying to run is very simple, I want to fix the factor loading for both traits to be equal:
commonfactor.model1 <- 'F1 =~ a * trait1+ a * trait2
F1 ~~ F1'
This is my first time dealing with lavaan syntax so I'm not sure this is correct for what I'm looking for. While troubleshooting I freed-up de model to commonfactor.model2 <- 'F1 =~ trait1 + trait2
F1 ~~ F1'
but still encounter the same "non-conformable arguments" error. When I use the commonfactorGWAS function it keeps running for days and never finishes and I'm not sure what the issue is.
Thanks so much for any help!