I have 20 observed factors and I want to check their validaty as a scale of 4 latent variables. For this purpose I should use the cfa function. Right?
Then I want also to check a second order model. Its structure is as follows: these 20 observed factors load on these 4 latent variables which consist 2 larger latent variables. Should I have to use the sem function for the second scenario? I'm using R studio and here is my code
MYMODEL='V1=~ Q1 + Q2 + Q3 + Q4
V2=~ Q5 + Q6 + Q7 +Q8+Q9
V3=~ Q10 + Q11 + Q12 + Q13 + Q14+ Q15
V4=~Q16+Q17+Q18+Q19+Q20
LB1=~V1+V2
LB2=~V3+V4'
MYMODEL.fit=sem(MYMODEL,data=MYDATA,missing="listwise", ordered = TRUE,estimator="WLSMV")
fitMeasures(MYMODEL.fit)
where Q... are the observed variables, V...are the first order latent variables and LB...the second order latent variables.