Programming the statistical procedures from SAS

PROC GENMOD statistics

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

PROC GENMOD statistics

proc genmod data= ugastudent_data;
class cd4_levels /param=glm;
model  Factor1 =  cd4_levels;  
run;

I want to know if Im able to generate f-statistics or r-squared values like i am able to do in a PROC Reg statement? As of right now, Im only getting wald statistics. 


Accepted Solutions
Solution
‎04-23-2018 10:49 PM
SAS Employee
Posts: 386

Re: PROC GENMOD statistics

Posted in reply to UGAstudent

Since the model you specify is a simple ANOVA model, you can fit it using least squares estimation in PROC GLM and get both R-square and F statistics. GENMOD uses maximum likelihood estimation to fit models in the class of generalized linear models, which yours is one such. GENMOD normally produces chi-square tests for the model effects. However, F tests can be generated if you specify one of SCALE=PEARSON or SCALE=DEVIANCE options as well as either the TYPE3 or TYPE1 option. These options are specified in the MODEL statement. R-square for generalized linear models is computed differently and does not have the simple interpretation that it has in models fit using least squares. However, there have been various R-square-like measures proposed for generalized linear models and one of them is available from this macro

View solution in original post


All Replies
Solution
‎04-23-2018 10:49 PM
SAS Employee
Posts: 386

Re: PROC GENMOD statistics

Posted in reply to UGAstudent

Since the model you specify is a simple ANOVA model, you can fit it using least squares estimation in PROC GLM and get both R-square and F statistics. GENMOD uses maximum likelihood estimation to fit models in the class of generalized linear models, which yours is one such. GENMOD normally produces chi-square tests for the model effects. However, F tests can be generated if you specify one of SCALE=PEARSON or SCALE=DEVIANCE options as well as either the TYPE3 or TYPE1 option. These options are specified in the MODEL statement. R-square for generalized linear models is computed differently and does not have the simple interpretation that it has in models fit using least squares. However, there have been various R-square-like measures proposed for generalized linear models and one of them is available from this macro

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 108 views
  • 1 like
  • 2 in conversation