BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lauramb
Fluorite | Level 6

Hi everyone I'm new to SAS so my question may be quite basic:

 

I have a blood test result (y) that follows the following relationship with a drug concentration (x):

Y = B0 + B1*X**0.5

 

As I understand this is a linear relationship for the parameters (https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_nlin_sect00...) so the regression should be done using a linear regression model.

 

I have used proc reg but with linear Y functions.

 

As I understand the code for the linear regression is: 

  proc reg data=dataser;
      var X**0.5;
      model Y=X;
   run;

 Is that correct?

 

If I have the data of two groups (patients vs control) how can I compare the regression coefficients for both groups?

 

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

@lbelluscio wrote:

If I have the data of two groups (patients vs control) how can I compare the regression coefficients for both groups?

 


proc glm data=dataser;
      class group;
      model Y=group x x*group;
quit;

If the variable group is not statistically significant when you perform this regression, then the intercepts of the two groups are not significantly different. If the interaction x*group is not statistically significant when you perform this regression, then the slopes of the two groups are not significantly different.

--
Paige Miller

View solution in original post

4 REPLIES 4
Ksharp
Super User

Add one more data step to get 

data dataser;
set dataser;
X=sqrt(X);
run;
proc reg data=dataser; model Y=X; quit;

 

 

 

PaigeMiller
Diamond | Level 26

@lbelluscio wrote:

If I have the data of two groups (patients vs control) how can I compare the regression coefficients for both groups?

 


proc glm data=dataser;
      class group;
      model Y=group x x*group;
quit;

If the variable group is not statistically significant when you perform this regression, then the intercepts of the two groups are not significantly different. If the interaction x*group is not statistically significant when you perform this regression, then the slopes of the two groups are not significantly different.

--
Paige Miller
lauramb
Fluorite | Level 6

Thanks all for your help!

StatDave
SAS Super FREQ

See this note for more on the general topic of comparing models fit to multiple groups. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 4013 views
  • 9 likes
  • 4 in conversation