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.

 

 

SAS Innovate 2025: Call for Content! Submit your proposals before Sept 16. Accepted presenters get amazing perks to attend the conference!
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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1516 views
  • 0 likes
  • 3 in conversation