Need for occasional consulting on stan model development

My company Gradient has the need for occasional consulting on Stan model development. We specifically desire folks that are able to take informal descriptions of models and to translate them into Stan code, ideally anticipating some of the context we are working with (e.g. as a marketing research consulting firm, most of our data comes from surveys, which means we often work with ordinal scales)

For example, here is a loose description of a model. I mean it more as an example of what we need, but this is also a live model we’d like to develop. This is something I could write myself, but I’m trying to spend more time specing tasks than actually doing them.

If this is (generally or specifically) up your alley, please reach out here or to me directly at tom@gradientmetrics.com


We will build a semi-supervised latent class model with the objective of finding segments that are

  1. Heterogenous in terms of attitudes, behaviors, and preferences
  2. Addressable/Targetable, and,
  3. Easy to map back to their existing database, with
  4. For each segment, a predictive “value equation”, determined by a regression, that identifies driver of preference

In statistical language, with:

  • Number of classes K
  • Targetable attributes T (e.g. demographic features used to buy advertising)
  • Database attributes D
  • Segmenting variables S
  • Preference metric P

We define the likelihood as follows:

how are segments different in terms of their behaviors?

For each variable si in S

P(Si = si) = P(Si = si | K = 1) * P(K = 1) + ... + P(Si = si | K = k) * P(K = k)

What observable attributes predict segment membership?

for each class K

  • from targeting data

p(K = k) = softmax(T * beta_segment_membership_targeting)

  • from database data

P(K = k) = softmax(D * beta_segment_membership_database)

what is the value equation for each segment?

P(P = p) = N(S * beta_preference_segment_1) * P(K = 1) + ... + N(S * beta_preference_segment_k) * P(K = k)

With parameters:

  • P(Si = si | K = 1) telling us what the distributions are for each segmenting variable are conditional on segment membership
  • beta_preference_segment_i being the value equation for each segment
  • beta_segment_membership_targeting telling us how to bucket unobserved people into different segment classes
  • beta_segment_membership_database telling us how to bucket their database into different segment classes