lavaan ERROR: model is a list, but not a parameterTable?

71 views
Skip to first unread message

Ashu

unread,
Sep 16, 2020, 5:17:37 AM9/16/20
to lavaan
Hello community members, 
I can't run lavaan code with "not a parameterTable" message.

My model:
model_jes3 <- ' 
  #latent:internal, institution observed:INFLU, COMPLEX, PARTY, ELECTION, CONGRESS internal1 =~ 1*INFLU1 + COMPLEX1; 
institution1 =~ 1*PARTY1 + ELECTION1 + CONGRESS1; 
internal2 =~ 1*INFLU2 + COMPLEX2 ; 
institution2 =~ 1*PARTY2 + ELECTION2 + CONGRESS2; i

nternal2 ~ internal1 + institution1; 
institution2 ~ internal1 + institution1; ' 

  #The observed variables are 4 or 5 scales ordinal variables
crossA_D <- jes3A_D %>% 
   sem(model_jes3, ordered = c("PARTY1","ELECTION1", "CONGRESS1", "INFLU1", "COMPLEX1", "NOCARE1", "PARTY2","ELECTION2", "CONGRESS2", "INFLU2", "COMPLEX2", "NOCARE2"))

Then I get these messages;
lavaan::lavaan(model = ., data = model_jes3, ordered = c("PARTY1", でエラー: 
lavaan ERROR: model is a list, but not a parameterTable?
lavaan NOTE: missing column(s) in parameter table: [lhs, op, rhs, free]

What's the problem?
Any advice will help me!

Terrence Jorgensen

unread,
Sep 16, 2020, 7:35:37 AM9/16/20
to lavaan
Not sure why you are using the weird, unnecessary piping operator from the Hadley-Wickham-verse, but it seems you are using it incorrectly.  The call is passing your model to the data= argument.  I assume jes3A_D is your data.frame?  Try following the format shown by the developer in the lavaan tutorial:

crossA_D <- sem(model_jes3, data = jes3A_D, ordered = c("PARTY1","ELECTION1", "CONGRESS1", "INFLU1", "COMPLEX1", "NOCARE1", "PARTY2","ELECTION2", "CONGRESS2", "INFLU2", "COMPLEX2", "NOCARE2"))


Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

岡田葦生

unread,
Sep 16, 2020, 11:26:05 AM9/16/20
to lav...@googlegroups.com
Thank you Terrence,
as you told my model and data were not properly located.

Thank you very much!

Ashu

2020年9月16日(水) 20:35 Terrence Jorgensen <tjorge...@gmail.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/4RebWwOWcxI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/a9ba32dc-dd40-4abe-9205-c6fb7457540ao%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages