Hello Josef,
Thank you for the reply.
Am 03.06.2024 14:24 schrieb
josef...@gmail.com:
`smapi.poisson(formula=formula, data=df, offset=my_offset)`
where my_offset is a 1-dim array, or pandas Series
The docu has room for improvement because "offset" is not listed there
as an argument and the possible values for "kwargs" are not described or
linked.
Did you get any error messages?
Yes.
x = reg.fit()
Warning: Maximum number of iterations has been exceeded.
Current function value:
4458231981365606423606362108676491528138936007099102773782264681006035469423790276026214755322372668336710045212855954776080397453649510400.000000
Iterations: 35
C:\python\Lib\site-packages\statsmodels\base\model.py:607:
ConvergenceWarning: Maximum Likelihood optimization failed to converge.
Check mle_retvals
warnings.warn("Maximum Likelihood optimization failed to "
I don't understand that message. Maybe some columns in the original data
frame has a wrong dtype?
df.info()
<class 'pandas.core.frame.DataFrame'>
Index: 775973 entries, 4 to 4358160
Data columns (total 9 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 PERSON 775973 non-null object
1 RETTUNGEN_N 775973 non-null int64
2 Alter 775973 non-null int32
3 Altersgruppe 775973 non-null category
4 Gender 775973 non-null category
5 VTAGE 775973 non-null int32
6 Pflegeform 775973 non-null int64
7 PFLEGEBEDUERFTIG 775973 non-null category
8 Vielfahrer 775973 non-null int64
dtypes: category(3), int32(2), int64(3), object(1)
memory usage: 37.7+ MB
Best,
Christian