Setting Priors on Transforms Parameters

14 views
Skip to first unread message

Michael Betancourt

unread,
Aug 16, 2013, 12:39:01 PM8/16/13
to stan...@googlegroups.com
Let say I have a model

parameters {
real mu_1;
real mu_2;
}

transformed_parameters {
real mu_a;
real mu_b;

mu_a = some_crazy_combo_of(mu_1, mu_2);
mu_b = some_other_combo_of(mu_1, mu_2);

}

model {
// likelihood
mu_a ~ prior_dist();
mu_b ~ prior_dist();
}

Will the Jacobian between (mu_1, mu_2) and (mu_a, mu_b) be added to the log_posterior?

Marcus Brubaker

unread,
Aug 16, 2013, 12:42:50 PM8/16/13
to stan...@googlegroups.com
Nope.  The user needs to do that manually.  It would be nice if we could somehow do it automatically, but I think that would be, at best, really hard.

Cheers,
Marcus



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

Bob Carpenter

unread,
Aug 17, 2013, 12:26:26 PM8/17/13
to stan...@googlegroups.com
It's very hard to do efficiently. And I'm not sure how we'd put
it in the language. But we can compute Jacobians with auto-diff
(just not very efficiently) and also log absolute determinants.

But there's not a good way to recognize triangular Jacobians and
save computation. Or a good way to separate out which Jacobians
are needed (only variables appearing on left of sampling statements).

In fact, we're going to have to do something like this for the
more sophisticated ODE solvers, where we integrate both the
original equations and their Jacobian (rather than auto-diffing
the integrator itself, which has issues with error bounds on
the Jacobians).

- Bob
> stan-dev+u...@googlegroups.com <mailto:stan-dev%2Bunsu...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages