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 | Treatment | Value |
24H | NT | 96.82479 |
24H | NT | 107.7479 |
24H | NT | 95.42732 |
24H | ND | 100.4287 |
24H | ND | 102.0154 |
24H | ND | 98.723 |
24H | PTX 2.5nM/ml | 58.0074 |
24H | PTX 2.5nM/ml | 63.0915 |
24H | PTX 2.5nM/ml | 70.4211 |
48H | NT | 96.82479 |
48H | NT | 96.82479 |
48H | NT | 95.42732 |
48H | ND | 102.2046 |
48H | ND | 97.09953 |
48H | ND | 100.4259 |
48H | PTX 2.5nM/ml | 58.23748 |
48H | PTX 2.5nM/ml | 58.83639 |
48H | PTX 2.5nM/ml | 54.70102 |
72H | NT | 96.82479 |
72H | NT | 107.7479 |
72H | NT | 95.42732 |
72H | ND | 103.9728 |
72H | ND | 98.43996 |
72H | ND | 96.73638 |
72H | PTX 2.5nM/ml | 34.60215 |
72H | PTX 2.5nM/ml | 43.03356 |
72H | PTX 2.5nM/ml | 35.74294 |
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;
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.
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
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;
Hello Rick!
If I have the same situation, but one data for each group, what PROC can I use?
Example:
DAY | GROUP | MEAN |
1 | 1 | 40 |
3 | 1 | 20 |
5 | 1 | 10 |
1 | 2 | 60 |
3 | 2 | 55 |
5 | 2 | 30 |
I would like to compare (P value) the mean between group 1 and 2 in each day (1, 3, 6).
Thank you.
Aska.
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;
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.