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;
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!
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.