turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Picking a Test/Model

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-07-2011 01:02 PM

Hey, All,

I'm given a data set of three variables: treatment (tmt), temperature (temp), previous temperature (ptemp), where there are five treatments and their effect on temperature is measured. We want to know which of the treatments (if any) helps lower temperature the most. We want to control for previous temperature. How can I do this in SAS? I'm pretty sure this would be an ANCOVA. There are five groups of five patients each, with each group receiving its own treatment. I want to do this in proc glm, I think.

Best,

John

I'm given a data set of three variables: treatment (tmt), temperature (temp), previous temperature (ptemp), where there are five treatments and their effect on temperature is measured. We want to know which of the treatments (if any) helps lower temperature the most. We want to control for previous temperature. How can I do this in SAS? I'm pretty sure this would be an ANCOVA. There are five groups of five patients each, with each group receiving its own treatment. I want to do this in proc glm, I think.

Best,

John

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Turock

05-07-2011 03:19 PM

A basic GLM will cover the unterlying question of "are the treatments different" and then you can use any number of multiple comparisons ((Tukey, Duncan, etc.) to examine where the differences are. Check the manual for which option might be most appropriate to your situation.

PROC GLM;

CLASS tmt;

MODEL temp=tmt ptemp/;

QUIT;

RUN;

Doc Muhlbaier

Duke

PROC GLM;

CLASS tmt;

MODEL temp=tmt ptemp/

QUIT;

RUN;

Doc Muhlbaier

Duke

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Doc_Duke

05-08-2011 04:49 PM

How will this control for previous sales, though?

This is my current code:

proc glm data=Temperatures plot=meanplot(cl);

class Tmt;

model Temp=Tmt Ptemp;

lsmeans Tmt / pdiff=all adjust=tukey lines;

run;

ods graphics off;

I want to model Temperature as a function of Treatment while controlling for Previous Temperature.

How could this be done?

This is my current code:

proc glm data=Temperatures plot=meanplot(cl);

class Tmt;

model Temp=Tmt Ptemp;

lsmeans Tmt / pdiff=all adjust=tukey lines;

run;

ods graphics off;

I want to model Temperature as a function of Treatment while controlling for Previous Temperature.

How could this be done?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Turock

05-08-2011 10:46 PM

That is exactly what that model statement does. The "Type III" effect of treatment will be controlling for previous temperature.

The way you have asked the question leads me to infer that you have never taken a linear models course. Such a course is beyond the scope of this forum. I'd recommend you read the introduction to the linear model in the SAS 9.2 documentation and follow that with a Paul Allison's BBU on linear models.

The way you have asked the question leads me to infer that you have never taken a linear models course. Such a course is beyond the scope of this forum. I'd recommend you read the introduction to the linear model in the SAS 9.2 documentation and follow that with a Paul Allison's BBU on linear models.