Programming the statistical procedures from SAS

Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

Reply
New Contributor
Posts: 2

Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

I have two data sets which I am using to run confirmatory factor analyses in PROC CALIS.  I am trying to output the Factor Scores Regression Coefficients using the ODS table "LatentScoresRegCoef".  In the analyses with one data set, this works fine.  In the analyses with the second data set, the following warning is produced:

 

WARNING: Output 'LatentScoresRegCoef' was not created.  Make sure that the output object name, label, or path is spelled
         correctly.  Also, verify that the appropriate procedure options are used to produce the requested output object.  For
         example, verify that the NOPRINT option is not used.

 

The Factor Scores Regression Coefficients output appears in each analysis but the ODS table is only created in one.  Since the code for the second data set parallels the code from the first (and was largely copied from the first), I can see no reason it will not work. 

 

Any thoughts?

[Version 13.1 SAS/STAT]

 

First analysis code: 


ODS output LatentScoresRegCoef=fac_scrs  ;
proc calis data=tmp_for_CFA maxiter=1000 platcov ; 
   path factor1  ===>  rac_ethn_hispanic speak_eng_home US_citzn US_birth ,                     

           factor2  ===>  age_grp50 age_grp60 age_grp70 age_grp80 medicare  ,

           factor3  ===>  ordnl_food_worry ordnl_food_run_out ordnl_inc__pov_lvl ,

           factor4  ===>  age_grp30 age_grp40 age_grp50 age_grp60 ;

   pvar  factor1=1.0,  factor2=1.0,  factor3=1.0,  factor4=1.0 ;
 run ;                            

 

Second analysis code:


ODS output LatentScoresRegCoef=fac_scrs ;
proc calis data=tmp_for_CFA maxiter=1000 platcov ; 
    factor  factor1  ===>  rac_ethn_hispanic rac_ethn_other US_birth speak_eng_home US_citzn ,

               factor2  ===>  often_run_out_food sometimes_run_out_food often_worry_no_food sometimes_worry_no_food ,

               factor3  ===>  age_grp50 age_grp60 age_grp70 age_grp80 medicare ,

               factor4  ===>  age_grp30 age_grp40 age_grp50 age_grp60 , 
               factor5  ===>  educ_HS_grad_only educ_coll_grad educ_some_coll educ_HS_no_HS_grad incm_pov_lvl_LE1_30 ,

               factor6  ===>  sometimes_run_out_food sometimes_worry_no_food incm_pov_lvl_LE1_30 ;
  pvar    factor1  =  1.0,  factor2  =  1.0,  factor3  =  1.0,  factor4  =  1.0,  factor5  =  1.0,  factor6  =  1.0  ;
  run ;

Respected Advisor
Posts: 2,655

Re: Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

I have two thoughts, but both are little more than guesses.

 

1. Even though you have maxiter=1000, the procedure may not have converged.  What does the iteration history look like?

 

2. You may be overfitting the data. The first fits four paths, with no more than 4 variables per path.  The second fits 6 paths, and at least one looks to me like it could be redundant (factor 6 looks a lot like factor 2, with the addition of a variable that is likely a near alias for two of the variables in factor 2).  With near collinearity, you could have a problem.

 

Steve Denham

New Contributor
Posts: 2

Re: Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

Steve, thank you for the thoughts.  The analyses both converged and both produced the factor scores in the output with no indications of any issues.  That is, there were no warnings in the log (other than the LatentScoresRegCoef data set not being output) or in the output.  The problem is that the first one produced the ODS LatentScoresRegCoef table while the second one did not.

 

Respected Advisor
Posts: 2,655

Re: Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

Well two bad guesses then...

 

Have you tried naming them differently, such as fac_scores1 for the first and fac_scores2 for the second?  I was just thinking that some kind of lock may be going on so that when the second run is made, ODS can't write to the file.  Frankly, I don't have much hope for this approach, but who knows?

 

I see a contact with Tech Support in your near future...

 

Steve Denham

SAS Super FREQ
Posts: 3,319

Re: Unable to Create ODS table LatentScoresRegCoef from PROC CALIS

I don't use CALIS myself, but is it an interactive procedure?  This sounds like an issue that can occur when you put the ODS statement OUTSIDE of an interactive procedure.   For the issue I am thinking of, see the article

"Point/Counterpoint: Where should you put ODS SELECT and ODS OUTPUT statements?"

 

Try putting the ODS OUTPUT statement after the PROC CALIS statement in both calls.  It won't hurt and it is a good programming practice to adopt.

Ask a Question
Discussion stats
  • 4 replies
  • 93 views
  • 0 likes
  • 3 in conversation