BookmarkSubscribeRSS Feed
plf515
Lapis Lazuli | Level 10

I am using SAS 9.4 1M6 on a Windows 10 machine.

 

I am doing a confirmatory factor analysis with ordinal variables (Likert type scales, some 1-5 and some 1-7).

 

I first tried doing this with PROC CALIS and an appropriate method. But method = wls gave an error that the weight matrix was singular or not positive definite (I think that my N of 202 is not enough) and method = mlm took a long time to run and produced output that was hard to interpret, so, I decided to work directly with the covariance matrix.

 

My old CALIS code was

proc calis data = new method = mlm;

factor
  F1 ---> q42 q52 q62 q72,
  F2 ---> q41 q51 q61 q71,
  F3 ---> q44 q54 q64 q74,
  F4 ---> q43 q53 q63 q73,
  F5 ---> q46 q56 q66 q76,
  F6 ---> q45 q55 q65 q75,
%.  ETC;


run;

 

I have now made a correlation data set using:

 

/*CORRELATIONS FOR INPUT TO CALIS*/
proc corr data = new spearman out = johncorr;
var q1-q80;
run;

 

but I am not quite sure how to modify my code to make it work.  Do I just change the PROC CALIS statement to have data = johncorr?  Or do I need to do more?  Should I still include all the factor statements?

8 REPLIES 8
PaigeMiller
Diamond | Level 26

There is a CORR option in PROC CALIS, is that what you need?

--
Paige Miller
plf515
Lapis Lazuli | Level 10

Thanks Paige.

 

I'm not sure.

 

At least for me, the documentation for CALIS does not meet SAS' usual high standard for quality.

plf515
Lapis Lazuli | Level 10

I found the answer from SAS tech support. There is no need to modify the code more than what I did.

 

But they suggested perhaps treating the IVs as continuous rather than ordinal.

 

Peter

Emma_at_SAS
Lapis Lazuli | Level 10

Dear plf515,

I have a question about using proc CALIS that I think your experience may help me. I want to use proc CALIS for mediation analysis. 

independent variables: Ordinal Likert type

Mediator: binary

response variable: binary

I see you got support from the SAS team and the suggested to treat your ordinal variables as continuous. Do you have any suggestions for my type of variable?

 

Thank you,

Maryam

 

PaigeMiller
Diamond | Level 26

@Emma_at_SAS wrote:

Dear plf515,

I have a question about using proc CALIS that I think your experience may help me. I want to use proc CALIS for mediation analysis. 


PROC CAUSALMED does mediation analysis. You should see if that meets your needs.

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...

--
Paige Miller
Emma_at_SAS
Lapis Lazuli | Level 10

Thank you Paige Miller for your suggestion. It sounds that the version of SAS-Studio that my institute runs does not support the CAUSALMED procedure. On the SAS documentation page, proc causalmed is listed under:

SAS® 9.4 and SAS® Viya® 3.4 Programming Documentation

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...

 

1- do you think that might be the case and my problem is the version of my SAS software?

2- Are you aware of any trial/student version that I may use for this specific analysis?

 

Thank you!

PaigeMiller
Diamond | Level 26

Sorry, I don't know the answers to these questions. You could always contact SAS Tech Support.

--
Paige Miller
Emma_at_SAS
Lapis Lazuli | Level 10

Thank you for your suggestion! I will contact the SAS tech support.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1550 views
  • 5 likes
  • 3 in conversation