I am trying to model a percentage response variable. Looked at bounded distributions but you can’t specify observed variables. I also tried using a Beta distribution to constraint my observed data from 0 to 1 but I had some exceptions with PyMC3. I would prefer using Normal distributions. Maybe there’s something I could do with the logistic function?
I am doing a multi-level model:
# Intercept for each store, distributed around group mean mu_a a = pm.Normal('alpha', mu=mu_a, sd=sigma_a, shape=len(uniqueStores)) # Intercept for each store, distributed around group mean mu_a b = pm.Normal('Shift1Score', mu=mu_b, sd=sigma_b, shape=len(uniqueStores)) score_est = pm.math.sigmoid(a[storeIDX] + (b[storeIDX] * audits.Shift1Score.values)) # Data likelihood y_like = pm.Normal('y_like', mu=score_est, sd=eps, observed=audits.FinalScore)
Even with the sigmoid here I still get a posterior where the HPC contains values greater than 1.
Help would be greatly appreciated! Thanks!