SAS Super FREQ

## Re: Regression models with restricted cubic splines

The SCALE=P option in PROC GENMOD is one way to address overdispersion, as explained in the documentation below --

https://go.documentation.sas.com/doc/en/pgmsascdc/v_021/statug/statug_genmod_syntax22.htm#statug.gen...

PROC GLIMMIX does not have this option, it uses a separate statement to address overdispersion -

random _residual_;

This is explained in the link below --

https://go.documentation.sas.com/doc/en/pgmsascdc/v_021/statug/statug_glimmix_details05.htm

Super User

## Re: Regression models with restricted cubic splines

You could use PROC LOGISTIC + MODEL 's option SCALE= to get it.
You also could use PROC LOGISTIC +EFFECT to get cubic splines effect.
You also could use PROC LOGISTIC +/param=glm + lsmean trt/ ilink diff + %nlmeans to get risk difference or risk ratio.
Check the second example:
https://support.sas.com/kb/23/003.html
For Risk Ratio or Relative Risk

https://support.sas.com/kb/37/228.html
For Risk Difference
Obsidian | Level 7

## Re: Regression models with restricted cubic splines

Hi, My outcome is count with an offset.

Super User

## Re: Regression models with restricted cubic splines

```You could change it into Binomial Distribution, and feed it into PROC LOGISTIC .

n    c  age
10   2  1
4    1  2

---->
y  age
1  1
1  1
0  1
0  1
0  1
0  1
0  1
0  1
0  1
0  1

1  2
0  2
0  2
0  2

And using:
model Y(event='1') = age;

Or just usa another style of MODEL statement:
model c/n = age;

Note: This assuming Binomial Distribution , Not Poisson Distribution,
But I think they are almost the same thing, since Poisson is modeling for more discrete data,
as long as your data is NOT so discrete ,Binomial is more than suffice .
```
Obsidian | Level 7

## Re: Regression models with restricted cubic splines

Thanks for the information. My data is very discrete with overdispersion. I need to either adopt scaled variance with Poisson distribution or negative binomial distribution.

Super User

## Re: Regression models with restricted cubic splines

You could try my code firstly.
As long as there is no WARNING or ERROR info in LOG ,that would be OK.
Discussion stats
• 20 replies
• 1261 views
• 10 likes
• 5 in conversation