Modeling Tweedie distribution in statsmodels in Google Colab, but I'm getting an error while trying to use estimate_tweedie_power function. Here is the code from my notebook.
#Training model
tweedie_model = sm.GLM(y_train, X_train, exposure = df_train.exposure, family=sm.families.Tweedie(link=None,var_power=1.5,eql=True))
tweedie_result = tweedie_model.fit()
#Using the initial model output to decide the optimum index parameter "p"
GLM.estimate_tweedie_power(training_result, method='brentq', low=1.01, high=5.0)
Here is my error while running estimate_tweedie_power function.
estimate_tweedie_power() missing 1 required positional argument: 'mu'
You might want to use something like:
Reference: https://www.statsmodels.org/stable/_modules/statsmodels/genmod/generalized_linear_model.html#GLM.estimate_tweedie_power