Another error...

1,166 views
Skip to first unread message

Christina Freise

unread,
Mar 4, 2014, 12:39:04 PM3/4/14
to lav...@googlegroups.com
Hi everybody,

seems that R and I still won't be friends.

As I could run my model the other day, today I got another error (using the same model and data!?)

Could someone please explain, what the following error means:

Error in if ((!is.matrix(model)) | ncol(model) != 3) stop("model argument must be a 3-column matrix") : 
  Argument is of size 0
Additionally: Warning:
In sem.semmod(model = my.model, estimator = "MLM", data = Datenmatrix) :
  -1 observations removed due to missingness

+++++++++++++++++++++

my.model <- '

   # Latente Variablen

     Vertrauen =~ Var29+ Var30+ Var31+ Var32+ Var33+ Var34 

     Erfahrung =~ Var9+ Var10+ Var11+ Var12+ Var15+ Var16+ Var17

     Zufriedenheit =~ Var18+ Var19+ Var20+ Var21+ Var22+ Var23+ Var24

     Markenbindung =~ Var35+ Var36+ Var37+ Var40

     

   # Regression

     Markenbindung ~ Erfahrung + Zufriedenheit + Vertrauen

'


# Modell anpassen

fit <- sem(model=my.model, estimator = "MLM", data=Datenmatrix)

Datenmatrix.RData

yrosseel

unread,
Mar 4, 2014, 2:15:28 PM3/4/14
to lav...@googlegroups.com
On 03/04/2014 06:39 PM, Christina Freise wrote:

> In sem.semmod(model = my.model, estimator = "MLM", data = Datenmatrix) :
> -1 observations removed due to missingness

This is not a lavaan warning. Would you have loaded the sem package in
the same session? If so, you need to call the 'lavaan' version of sem()
as follows:

fit <- lavaan::sem(model=my.model, estimator = "MLM", data=Datenmatrix)

Yves.

Christina Freise

unread,
Mar 4, 2014, 5:37:31 PM3/4/14
to lav...@googlegroups.com
Thanks Yves, that worked! :-)
Reply all
Reply to author
Forward
0 new messages