Programming the statistical procedures from SAS

Picking a Test/Model

New Contributor
Posts: 2

Picking a Test/Model

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.

Trusted Advisor
Posts: 2,114

Re: Picking a Test/Model

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.

CLASS tmt;
MODEL temp=tmt ptemp/;

Doc Muhlbaier
New Contributor
Posts: 2

Re: Picking a Test/Model

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;
ods graphics off;

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

How could this be done?
Trusted Advisor
Posts: 2,114

Re: Picking a Test/Model

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.
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation