Groups
Sign in
Groups
lavaan
Conversations
Labels
About
Send feedback
Help
Dataframe as model syntax (CFA)
13 views
CFA
lavaan
syntax
Skip to first unread message
Chiel Mues
unread,
Jan 8, 2020, 10:08:39 AM
1/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lavaan
Say I have a dataframe such as this:
Factor: Item:
Factor_A Item_1
Factor_A Item_2
Factor_B Item_3
Factor_B Item_4
So just the factor, and the name of the Item that belongs to that factor.
Is it possible to feed this into lavaan as model syntax?
Mauricio Garnier-Villarreal
unread,
Jan 8, 2020, 11:40:17 AM
1/8/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lavaan
If it is for a CFA, stating which item goes in which factor, yes, you can do something like this
dd <- data.frame(factor=rep(c("f1","f2","f3"),4), item=paste0("it_",1:12))
dd
paste(dd$factor, dd$item, sep="=~") ### lavaan will take this as syntax
Reply all
Reply to author
Forward
0 new messages