07-21-2011 09:21 AM
Hi everybody, and sorry for my english !
I use the proc Calis to run confirmatory factor analysis, using the lineqs statement. Data contains categorical variables, representing answers (1, 2, 3 or 4) of some items of a scale.
So, i want to analyze polychoric correlations with the WLS method, and not with the maximum likelihood one.
The problem under SAS with proc calis, polychoric correlations and WLS estimation method, is the need of an asymptotic covariance matrix (in the INWGT option).
The error on SAS is : "ERROR: You need either a DATA= raw data set or an INWGT= data set to compute WLS or DWLS estimators."
How can i compute this asymptotic covariance matrix ?
Thank you !
07-21-2011 12:15 PM
Thank you for your answer.
I have already seen this page, but with the proc reg, i dont't know how to have this asymptotic covariance model because i have no variable to "explain" (latent variables) and so i can't put anything in the Model statement of this proc (model y= x1 x2 x3)
07-22-2011 07:48 AM
Can you get the covariance matrix from PROC CORR?
Perhaps this might work:
proc corr data=indata pearson;
var x1 x2 x3;
ods output covar=cov;
The dataset work.covar should have the covariances.
Alternatively, create a dummy response variable (say dummy=1 for all records), and use PROC REG
proc reg data=indata;
model dummy=x1 x2 x3/acov;
ods output acov=acovest;
And the dataset work.acov would have what you could use.
Good luck. I will be curious if either method gives what you need.
07-22-2011 10:56 AM
Thank you Steve for your answer.
Bur with the proc corr procedure, ot's not the asymptotic covariance matrix which is compute but the covariance matrix.
And with the proc reg with the variable of 1, it doesn't work: it computes a matrix with zeros.
07-25-2011 08:57 AM
Well. So much for the easy way.
The PROC CALIS makes a lot of references to what I would call two pass analyses. You run it once, and get several output matrices, then use those as inputs. One that is prominent is OUTWGT= which should give you the weightings you need to start the second pass.
I am somewhat concerned by the error statement, and what I tracked down in the documentation. You should be able to do a weighted least squares analysis without specifying INWGT=. Since the error statement also mentions DATA=, check your syntax in the PROC CALIS statement to make sure that you are correctly specifying the input data set.
07-25-2011 10:06 AM
Thank you Steve.
I will try your recommandations.
But are you sure that the data that contains the OUTWGT output is the asymptotic covariance matrix ?
Concerning the error, i use in the DATA= a polychoric correlation matrix, so the error is normal. The WLS analysis is possible when raw data is specified in DATA=, and it is also possible when a correlation matrix is specified in DATA=, but in this case the INWGT option is needed.