# Confirmatory factor analysis error message

#### Fran.c

##### New Member
Hi,

I'm new to R and I'm attempting to run a CFA model using the lavaan package. So far I have imported my data from SPSS and specified my model and I am now try to fit the model and am getting an error message (please see below syntax and error message)

> SCS.model <- 'rank =~ SCS001 + SCS002 + SCS006 + SCS007 + SCS008
+ belongingness =~ SCS011 + SCS004 +SCS005'
>
> fit <- cfa(SCS.model, data = SCS.data)

Error in lavData(data = data, group = group, group.label = group.label, :
lavaan ERROR: data object of class data.set

ps. SCS.data is what I have named the data

Does anyone know why this may be happening? Please let me know should you require any further info. Any help would be much appreciated! thanks

#### Lazar

##### Phineas Packard
What is returned when you do:
Code:
class(SCS.data)