BookmarkSubscribeRSS Feed
greerham
Calcite | Level 5

Hi-I could use some help. I need to preform a statistical analysis to assess the association between type of insurance (categorical) and the outcome of diabetes status at visit 3 (binary variable). The diabetes status of interest is Yes (which are all of the responses).

 

I wrote my code as... proc logistic data=jhst_proj2final; class PRIVATEPUBLICINSV3; model DIABETESV3(event='Yes')=PRIVATEPUBLICINSV3; run;

 

But I keep getting this error message "ERROR: All observations have the same response. No statistics are computed."

 

I am trying to figure out if the analysis I selected is wrong or if the code is wrong.

3 REPLIES 3
ballardw
Super User

Try running this code:

 

Proc freq data=jhst_proj2final;

   tables PRIVATEPUBLICINSV3*DIABETESV3 / list missing;

run;

That will show all of the combinations of your, I assume, insurance variable with the diabetes variable. If all of the diabetes are "yes" then that is the issue. Likely you need to go back to what created the diabetes variable and see why all the values are "yes".

 

Another possibility would be that the insurance is missing for all of the "No" diabetes responses.

greerham
Calcite | Level 5

I figured it out, thank you!

ballardw
Super User

@greerham wrote:

I figured it out, thank you!


Please describe what you figured out.

That way when someone finds a link to this thread in an internet search later with a similar problem they will have at least one possible solution to their problem.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 689 views
  • 2 likes
  • 2 in conversation