BookmarkSubscribeRSS Feed
cjohnson
Obsidian | Level 7
As I understand it, ANOVA with categorical variables is equivalent to Linear Regression with dummy variables. But, when I run ANOVA, I do not get coefficients. Can anyone tell me why this is, or if there is an option to add these?

Thanks,
Chris
Christopher Johnson
www.codeitmagazine.com
6 REPLIES 6
Doc_Duke
Rhodochrosite | Level 12
Not that I know of. However, GLM will provide the coefficients.
cjohnson
Obsidian | Level 7
I don't get the coeff when I run glm either. If I use glm with continuous indep and dep variables, I get the coeff, but not when I use catagorical indep and continuous dep.
Christopher Johnson
www.codeitmagazine.com
Susan
Calcite | Level 5
Perhaps the SOLUTION option on the MODEL statement (available in the GLM, MIXED, and GLIMMIX procedures) provides what you're looking for.

If not, then it would be helpful if you posted your code.

--Susan
deleted_user
Not applicable
In the model statement /solution or /s will give all the coefficients for fixed effects both class and otherwise
cjohnson
Obsidian | Level 7
Thanks very much! The solution option did the trick.

PROC GLM DATA=CLAIMS;
CLASS INJURY;
MODEL INCURRED = INJURY /SOLUTION;
MEANS INJURY / HOVTEST;
RUN;
Christopher Johnson
www.codeitmagazine.com
deleted_user
Not applicable
I see Susan recommended the same "solution"

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1885 views
  • 0 likes
  • 4 in conversation