I am trying to compare the lifespan of mice in different dietary groups:
1. NP: nonpurified, standard diet with no restriction
2. N/N85: normal diet begore and after (85 kcal/wk) --> control group
3. N/R50: normal diet before weaning, reduced calories (50 kcal/wk) after
4. R/R50: reduced calorie (50 kcal/wk) before and after weaning
5. N/R50 lopro: normal diet before weaning, reduced calories (50 kcal/wk) after with decreased protein content
6. N/R40: normal diet before weaning, severely reduced calories (40 kcal/wk) after
Data:
lifetime: numeric (continuous)
diet1: numeric --> use as factor 1 through 6
Log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 PROC GLM data = DATA.Caloric;
74 class diet1;
75 model lifetime = diet1;
76 lsmeans diet1 / adjust = Tukey cl;
77 contrast '85 kcal/wk vs. 50 kcal/wk' diet1 0 3 -1 -1 -1 0;
78 contrast 'Pre-Weaning vs. No Pre-Weaning' diet1 -1, -1, -1, 5, -1, -1;
__ _
22 22
200 200
ERROR: Variable NAME not found.
78 contrast 'Pre-Weaning vs. No Pre-Weaning' diet1 -1, -1, -1, 5, -1, -1;
__
22
ERROR 22-322: Syntax error, expecting one of the following: a name, INTERCEPT.
ERROR 200-322: The symbol is not recognized and will be ignored.
79 contrast '50 kcal/wk vs. 40 kcal/wk' diet1 0 0 1 1 1 -3;
NOTE: The previous statement has been deleted.
80 contrast 'Reduced Protein vs. Normal Protein' diet1 -1, -1, -1, -1, 5, -1;
__ __
22 22
200 200
ERROR: Variable NAME not found.
ERROR 22-322: Syntax error, expecting one of the following: a name, INTERCEPT.
ERROR 200-322: The symbol is not recognized and will be ignored.
81 contrast 'Lab Mice vs. Control Mice' diet1 -1 5 -1 -1 -1 -1;
NOTE: The previous statement has been deleted.
82
83 estimate '85 kcal/wk vs. 50 kcal/wk' diet1 0 3 -1 -1 -1 0 / divisor = 3;
84 estimate 'Pre-Weaning vs. No Pre-Weaning' diet1 -1, -1, -1, 5, -1, -1 / divisor = 5;
_
22
76
NOTE: The previous statement has been deleted.
ERROR 22-322: Syntax error, expecting one of the following: a name, a numeric constant, a datetime constant, ;, +, -, /,
INTERCEPT.
ERROR 76-322: Syntax error, statement will be ignored.
85 estimate '50 kcal/wk vs. 40 kcal/wk' diet1 0 0 1 1 1 -3 / divisor = 3;
86 estimate 'Reduced Protein vs. Normal Protein' diet1 -1, -1, -1, -1, 5, -1 / divisor = 5;
_
22
76
NOTE: The previous statement has been deleted.
ERROR 22-322: Syntax error, expecting one of the following: a name, a numeric constant, a datetime constant, ;, +, -, /,
INTERCEPT.
ERROR 76-322: Syntax error, statement will be ignored.
87 estimate 'Lab Mice vs. Control Mice' diet1 -1 5 -1 -1 -1 -1 / divisor = 5;
88 RUN;
89
90 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
102
I am not sure what these errors are referring to. I appreciate any feedback. Thank you!
Nevermind... It's the commas. Saw the mistake as it was posting.
Nevermind... It's the commas. Saw the mistake as it was posting.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.