Skip to content

Error in rowMeans function

4 messages · Gunsalus, Catherine, PIKAL Petr, yrosseel

2 days later
#
Hi
are you sure about =~ and ~~ is valid in specifying formula? I am not avare of cfa but it does not seem to be in accordance with all other formulas i know.
Are your data semHW1dat1 structured as required by cfa?

Somehow cfa function missed your atds1par and other variables which are outside of data frame. Maybe the function requires them to be included in data frame.

All following errors are due to cfa did not evaluated the model.

Regards
Petr
#
On 10/15/2012 08:28 AM, PIKAL Petr wrote:
The cfa() function requires that all variables that are specified in the 
model syntax are included in a data.frame. So after constructing  your 
parcels, you need to create a new data.frame containing them:

Data <- data.frame(ads1par=atds1par, atds2par=atds2par, 
atds3par=atds3par, sgs1par=sgs1par, sgs2par=sgs2par, sgs3par=sgs3par)

then, you can call the cfa() function but with 'Data' as your data 
argument (note: no need to provide sample.nobs, we get it from the 
data.frame):

parout1 <- cfa(parmod1, data=Data, std.lv=TRUE)

Hope this helps,

Yves
http://lavaan.org
#
Hi

I did not use cfa function, the former poster (Catherine)did and I only advised almost the same as you did.

Regards
Petr