Using STAN for deterministic problems

93 views
Skip to first unread message

Minh Trinh

unread,
Aug 28, 2015, 3:17:58 AM8/28/15
to Stan users mailing list
Hi everyone,

I'm new to this list , so please excuse any possible faux-pas I may commit.

I am trying to estimate the parameters of a deterministic data generating process that closely resembles a probabilistic (multinomial) one. In particular, for data X and unknown parameters theta, f(X, theta) is a N x 5 matrix where each row is a 5-simplex i.e. sums to 1. In a normal multinomial model, each Y_i would be drawn from a multinomial distribution with probability parameters equal to each row of f(X, theta). However, in this case, instead of a random multinomial draw, Y_i is simply the category with the highest probability.

The parameters in this problem may be calculated analytically, but I'm wondering if there is anyway to get at them through Monte Carlo methods. Also, generally, in problems where there might also be similar deterministic data generating processes and where there might not be unique solutions for the parameters, would Monte Carlo methods be useful at all? And if MC can be useful, how do I do it in STAN? I am thinking of using distributions with variability close to zero to mimic the deterministic process, but I'm not sure if this is theoretically justified.

Thanks so much,
Minh 


Bob Carpenter

unread,
Aug 28, 2015, 2:27:48 PM8/28/15
to stan-...@googlegroups.com
If you want to use Bayesian methods, you need to write down
a joint model, typically defined in terms of a
probabilistic data-generating process. It isn't clear to me
what the shape of X and Y_i would be or what theta is. It
helps if you can write down the dimensions and a short description
of what the values mean.

Stan's not ideally suited to this kind of deterministic data-generating
problem, because it amounts to a constraint solving
problem for the parameters (assuming X is some matrix of predictors for
individuals and there is a latent coefficient vector).

You don't want to try to write down a low-variance approximation to
something deterministic --- you want to write down the data generating
process.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Minh Trinh

unread,
Aug 28, 2015, 3:38:00 PM8/28/15
to Stan users mailing list
Thank you very much for your reply. I hesitated at first to give more specific description of X and Y since I was worried it might come off as asking for help on specific homework questions. In any case, X_1, X_2, X_3 are three N x 4 matrices of 0's and 1's where each row has one 1 and three 0s (e.g. answers to multiple choice questions). Theta_1, Theta_2, Theta_3 are 4 x 5 matrix to "score" the answers. Then, p = f(X, Theta) is (X_1 x Theta_1) .* (X_2 x Theta_2) .* (X_3 x Theta_3) where .* is elementwise multiplication. After rescaling, p is a N x 5 matrix where each row is the probability of each observation falling into one of five "types." Y is then a N x 1 matrix where each Y_i \in {1, 2, 3, 4, 5} corresponding to each "type."

An example maybe personality tests, where you answer a couple of multiple choice questions and are told what kind of personality type you belong to. The tricky bit here is that I know that each Y_i is not randomly drawn from a multinomial distribution with probability p_i, but simply obtained by referencing the category in p with the highest probability. For example, if p_i = [0.2, 0.2, 0.3, 0.2, 0.1] then Y_i = 3.

So my understanding is that what I have here is a working data generating process, except for that it is deterministic instead of probabilistic. Since Stan only allows probabilistic models for the final step, the low-variance approximation approach was the first thing that popped in my head, but it seems that it's not well justified. I would love to hear your thoughts and suggestions on whether there's any alternatives.

Bob Carpenter

unread,
Aug 31, 2015, 4:22:55 PM8/31/15
to stan-...@googlegroups.com
Thanks for clarifying. I don't see good alternatives in Stan.
The problem is that by choosing a max, you "cut" the probabilistic
connection between input and output and make it a constraint
resolution problem.

- Bob
Reply all
Reply to author
Forward
0 new messages