Is there a way where I can ensure that the samples drawn from the distribution belong to positive side only? For example,
mu1 = 3
sd1 = 1
mu2 = 1
sd2=0.5
param1 = pm.Normal('param1_{0}'.format(index), mu=mu1, sd=sd1)
param2 = pm.Normal('param2_{0}'.format(index), mu=mu1, sd=sd1)
param3 = pm.Normal('param3_{0}'.format(index), mu=mu2, sd=sd2)
param4 = pm.Normal('param4_{0}'.format(index), mu=mu2, sd=sd2)
offset = pm.Normal('offset_{0}'.format(index), mu=mu2, sd=sd2)
# Likelihood
alpha = tt.abs_(param1*ON_shared + param2*OFF_shared + offset)
beta = tt.abs_(param3*ON_shared + param4*OFF_shared)
mu = pm.math.log(alpha)
s = tt.abs_(tt.power(beta, -1))
final = pm.Logistic('final_{0}'.format(index), mu=mu, s=s, observed=pm.math.log(data))
step = pm.NUTS([param1, param2, param3, param4, offset])
trace = pm.sample(trace_length, step = step, tune = 500)
print(pm.summary(trace))
Generally the summary after few iteration leads to the params having negative means. I want to avoid that by specifying explicitly not to sample negative values. Can this be done?