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
@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.
Add one more data step to get
data dataser;
set dataser;
X=sqrt(X);
run;
proc reg data=dataser; model Y=X; quit;
@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.
Thanks all for your help!
See this note for more on the general topic of comparing models fit to multiple groups.
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!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.