How can I calculate the estimate of factor loading for latent variables between different data frames?
I have 3 data frames related to 1 latent variable (the same variables A B C D) but in different intervals.
- dataframe1 (100-120 days). (1550 records)
- dataframe2 (120-150 days). (1780 records)
- dataframe3 (180-250 days). (1670 records)
package (lavaan)
model1 <- 'latent_variable1 =~ A + B + C + D
A~~B'
output1 <- cfa(model1, data=datafram1, std.lv=TRUE)
output2 <- cfa(model1, data=datafram2, std.lv=TRUE)
output3 <- cfa(model1, data=datafram3, std.lv=TRUE)
Now I would like to calculate the difference on the estimate between the 3 latent variables using SEM. Someone could help me?
example:
model<- 'latent_variable1 ~ latent_variable2 ~ latent_variable3'
output4<-sem(model, dataframe =????, std.lv=TRUE)