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.

 

 

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 2024

Innovate_SAS_Blue.png

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. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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