Programming the statistical procedures from SAS

ANOVA

Reply
Frequent Contributor
Posts: 97

ANOVA

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
Valued Guide
Posts: 2,108

Re: ANOVA

Not that I know of. However, GLM will provide the coefficients.
Frequent Contributor
Posts: 97

Re: ANOVA

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
Contributor
Posts: 31

Re: ANOVA

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
N/A
Posts: 0

Re: ANOVA

In the model statement /solution or /s will give all the coefficients for fixed effects both class and otherwise
Frequent Contributor
Posts: 97

Re: ANOVA

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
N/A
Posts: 0

Re: ANOVA

I see Susan recommended the same "solution"
Ask a Question
Discussion stats
  • 6 replies
  • 76 views
  • 0 likes
  • 4 in conversation