April 20, 2023, 9:55 p.m. | /u/spaceferret8

Data Science www.reddit.com

Hello!

I am running a Poisson regression on my dataset. The variance is 3x as high as the mean so I need to adjust the dispersion parameter "scale" from the StatModel package.

[https://www.statsmodels.org/stable/glm.html](https://www.statsmodels.org/stable/glm.html)

I tried the following code but was met with an error that "scale" was not recognized. Without the "scale" the model works.

sm.GLM(Y, X, Scale = 3, family=sm.families.Poisson()).fit()

Any tips here?

code datascience dataset error family mean overdispersion package regression running scale tips variance

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne