BookmarkSubscribeRSS Feed
jeanda
Calcite | Level 5

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 !

6 REPLIES 6
art297
Opal | Level 21

Definitely outside of my area of expertise, but see if the following page provides what you need:

http://people.ku.edu/~preacher/interact/acov.htm

HTH,

Art

jeanda
Calcite | Level 5

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)

SteveDenham
Jade | Level 19

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;

run;

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;

quit;

And the dataset work.acov would have what you could use. 

Good luck.  I will be curious if either method gives what you need.

jeanda
Calcite | Level 5

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.

SteveDenham
Jade | Level 19

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.

Good luck.

jeanda
Calcite | Level 5

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.

Thank you.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1355 views
  • 0 likes
  • 3 in conversation