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.
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.
I figured it out, thank you!
@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.
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.
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.
Ready to level-up your skills? Choose your own adventure.