BookmarkSubscribeRSS Feed
Yughaber
Quartz | Level 8

I have data from two different years. The data is about the use of a drug, that is recorded in number of vials, that used to be an uncontrolled drug during the first year and then became controlled during the second year. I want to compare the difference in the drug use during these two time periods of the drug being uncontrolled and controlled. However, I also have other variables such as different types of diseases that the patients had which might be confounding with the amount of the drug used. I also have the different patient counts for each time period which might effect the amount of drug used. 

 

I am thinking of using multiple linear regression for this analysis, however, not quiet sure of the coding part in SAS is it a prog reg or a proc glm? And do I need to combine my data from each year and indicate controlled/uncontrolled in a new column or should I analyze them separately? 

 

I guess I understand how to look for confounding but need more help on how to compare two means while controlling for confounding...

2 REPLIES 2
ChrisHemedinger
Community Manager

[disclaimer: I'm not a statistician]

 

You might find this tutorial helpful. It uses the combo of PROC GLMSELECT and PROC REG to model the interactions that are difficult to accomplish with PROC REG alone.  Also leverages the Linear Regression task in SAS Studio, which can help you to get started with code that you can adapt as needed.

 

 

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
Sajid01
Meteorite | Level 14

Hello @Yughaber 
Diseases are categories.
Proc Regression does not accept categorical variables where as Proc GLM does accept categorical variables.
While you know best what you are doing, in the think the choice should really be between ANOVA and GLM.

sas-innovate-white.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
  • 2 replies
  • 2039 views
  • 0 likes
  • 3 in conversation