I am trying to make a model with the code below.
Model1 <- ' f1 =~ aaq1 + aaq2 + aaq3 + aaq4 + aaq5 + aaq6 + aaq7+ aaq8'
It seems possible to make it easy to use a function because there is a pattern in the code. Could you let me know how I can do it?
I tried this but it didn't work.
Model1 <- ' f1 =~ paste0(aaq, [1:8], sep = '+')'