BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Barkamih
Pyrite | Level 9

 Hi all 

 

I want to do an ANOVA test to compare this kind of data, I have three different groups NT as a control group, ND and PTX are the treatment groups,  each group has three different readings 24h, 48h and 72h. my data looks like below. So, what is my code should look like?

 

example, I want to compare 24h values of NT (control) by 24h of ND and PTX. as well as 48h and 72h. 

 

I hope you got my  point 

 

regards 

 

 
Hours TreatmentValue
24HNT96.82479
24HNT107.7479
24HNT95.42732
24HND100.4287
24HND102.0154
24HND98.723
24HPTX 2.5nM/ml58.0074
24HPTX 2.5nM/ml63.0915
24HPTX 2.5nM/ml70.4211
48HNT96.82479
48HNT96.82479
48HNT95.42732
48HND102.2046
48HND97.09953
48HND100.4259
48HPTX 2.5nM/ml58.23748
48HPTX 2.5nM/ml58.83639
48HPTX 2.5nM/ml54.70102
72HNT96.82479
72HNT107.7479
72HNT95.42732
72HND103.9728
72HND98.43996
72HND96.73638
72HPTX 2.5nM/ml34.60215
72HPTX 2.5nM/ml43.03356
72HPTX 2.5nM/ml35.74294

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

This is a balanced repeated-values ANOVA. When you don't have missing values or mistimed measurements (as seems to be the case) the traditional approach would be to use PROC GLM and a REPEATED statement, as shown in this example from the GLM documentation.  The modern approach (which sld advocates) is to use PROC MIXED, as shown in this example from the PROC MIXED documentation.

 

In both cases, the initial MODEL statement will be 

CLASS Hours Treatment;

MODEL Values = Hours Treatment Hours*Treatment;

View solution in original post

6 REPLIES 6
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Please show us the code you have tried, including code for data input.

 

If this is a repeated measures study, then you will want to use either MIXED or GLIMMIX, and you'll need to add a subject identifier to your data set.

 

I hope this helps.

 

Barkamih
Pyrite | Level 9

I didn't use any code yet, and the importing data was done normally because I have this data in excel sheet, my

data named cancer, this is a clinical data.

regards 

Rick_SAS
SAS Super FREQ

This is a balanced repeated-values ANOVA. When you don't have missing values or mistimed measurements (as seems to be the case) the traditional approach would be to use PROC GLM and a REPEATED statement, as shown in this example from the GLM documentation.  The modern approach (which sld advocates) is to use PROC MIXED, as shown in this example from the PROC MIXED documentation.

 

In both cases, the initial MODEL statement will be 

CLASS Hours Treatment;

MODEL Values = Hours Treatment Hours*Treatment;

aska_ujita
Obsidian | Level 7

Hello Rick!

If I have the same situation, but one data for each group, what PROC can I use?

Example:

 

DAYGROUPMEAN
1140
3120
5110
1260
3255
5230

 

I would like to compare (P value) the mean between group 1 and 2 in each day (1, 3, 6).

Thank you.

 

Aska.

Rick_SAS
SAS Super FREQ

The data does not match your question, but you can use the BY statement to compare samples on various days to each other.

 

The example data that you provide does not have any variation, but If you have the raw data, then you can use

 

proc glm;

by day;

class group;

model Y = group;

run;

aska_ujita
Obsidian | Level 7

Hello Rick, 

Yes, it haven't variation. Is just one information per day for each group.

 

But is still possible to make a simple analysis to compare?

Actually, I have measured temperament scores (0, 1, 2, 3, 4 and 5) in 40 animals (3 and 4 years old, distributed randomly) that is divided in two treatments: Treated group and control group.
I collected the temperament in day 1, 2, 3, 4 and 5 of experiment.

 

So... I would like to know if is possible to organize these scores in percentage (%) and make a table automatically by sas. I know that I can see the percentage by PROC FREQ, but it is possible to make a table with these output datas by sas? Than maybe I can use the procedure that you advise me before...??

 

thank you.

 

Aska.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 2171 views
  • 1 like
  • 4 in conversation