Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Linear regression comparison between groups

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-11-2018 06:27 PM
(4012 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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

Paige Miller

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Add one more data step to get

data dataser;

set dataser;

X=sqrt(X);

run;

proc reg data=dataser; model Y=X; quit;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks all for your help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

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.