Why GLM module doesn't have HalfStudentT distribution in Family?

This is my priors:

d_priors:

{‘Intercept’: <pymc3.distributions.continuous.Normal at 0x2adb3679a90>,
‘TV_ANE’: <pymc3.distributions.continuous.HalfStudentT at 0x2adb3679da0>,
‘TV_AMC’: <pymc3.distributions.continuous.HalfStudentT at 0x2adb3679e10>,
‘TV_ANIMALPLANET’: <pymc3.distributions.continuous.HalfStudentT at 0x2adaea2e240>,
‘TV_BBCAMERICA’: <pymc3.distributions.continuous.HalfStudentT at 0x2adb31895c0>,

My predictions from the model can be only positive numbers including ‘0’
So I want to specify my Likelyhood as HalfStudentT but GLM doesn’t have it:

module ‘pymc3.glm.families’ has no attribute ‘HalfStudentT’

How can I do it ?

Context for the model

with pm.Model() as model_glm_halfstud:

family = pm.glm.families.HalfStudentT()

pm.GLM.from_formula(formula,
                    data = data, 
                    priors = d_priors,
                    family = family)

If I can do it without GLM, please show me how. Thank you.

As we discussed previously, it’s not at all clear why you want a half Student’s t as your (inverse) link function. If you are trying to predict (non-negative) counts, then the canonical way to go is with Poisson, zero-inflated Poisson, or negative binomial. All will ensure that negative outcomes are impossible, but will permit your model to predict something useful (e.g., the location/mean of the distribution).

1 Like