BookmarkSubscribeRSS Feed
Turock
Calcite | Level 5
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
3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12
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
Turock
Calcite | Level 5
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?
Doc_Duke
Rhodochrosite | Level 12
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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 3 replies
  • 1207 views
  • 0 likes
  • 2 in conversation