Skip to main content

Timeline for How to define function in OpenBUGS

Current License: CC BY-SA 3.0

18 events
when toggle format what by license comment
Oct 16, 2014 at 11:16 comment added indiajoe Sure. But when i tried before, stackexchange said I cannot upvote without 15 reputations :( Hence I thought I shall explore some more and come back and accept the answer.
Oct 16, 2014 at 5:18 comment added fileunderwater @indiajoe Great! Remember to upvote if you find the answer useful.
Oct 15, 2014 at 23:18 comment added indiajoe Thank you very much for the help. I shall try STAN, I am also now giving a try with PyMC3.
Oct 15, 2014 at 13:15 comment added fileunderwater @indiajoe Response to your update; I dont think this is possible but I'm not sure. Also see my edited answer.
Oct 15, 2014 at 13:14 history edited fileunderwater CC BY-SA 3.0
addition
Oct 14, 2014 at 11:16 comment added indiajoe I have added a diagram of model also to clarify.
Oct 13, 2014 at 23:20 comment added indiajoe I have updated my question by giving the model with two layer equations. Is it clear?
Oct 13, 2014 at 23:01 comment added indiajoe I am sorry for the confusion. May be I shouldn't have used the term input for t,u and v. They are the parameters I need to estimate. ie, in the example you provided they are the betas. What I was trying to say is evaluation of the function M, which does not have any simple analytical form to write using standard bugs functions has to come from simulation.
Oct 13, 2014 at 22:51 comment added fileunderwater @indiajoe You need to specify more information in your question - in there you write that t, u and v are input, but here in the comments you write that you want to "...find the t, u and v" using M.
Oct 13, 2014 at 22:45 history edited fileunderwater CC BY-SA 3.0
addition
Oct 13, 2014 at 22:43 comment added indiajoe I have measurements y . which i need to fit with M to find the t,u and v. It is Hierarchical parameter estimation because my y data is grouped, and some of the parameter in M are group specific.
Oct 13, 2014 at 22:31 comment added fileunderwater @indiajoe You can always just give the output of M as data (basically giving yhat for each observation), and e.g. estimate sigma_y and evaluate the fit of the model. However, from my perspective, you usually want to estimate effects of t,u and v which you cannot do (from what I know) if you only supply a given output of M. What is the desired "outcome" of your MCMC model (i.e. what effects and model features do you want to evaluate)?
Oct 13, 2014 at 22:25 history edited fileunderwater CC BY-SA 3.0
addition
Oct 13, 2014 at 22:24 comment added indiajoe For each combination of parameters t,u,v; M is calculated using a complicated computer simulation. (It is basically a radiation transfer code). This is calculated already on a cluster machine for a grid of t,u and v. So I was planning to run MCMC on this grid. I can use some interpolation to find M(t,u,v) for each (t,u,v) in the MC chain. But for this i need to define a function which does that in OpenBUGS.
Oct 13, 2014 at 22:01 comment added fileunderwater Do you mean that all values of M(t,v,u) are "pre-calculated" as a grid of all combinations of predictor variables? What are your predictors, and I assume that you want to estimate the effects of t, v, & u? What type of functions are hidden in M? Without this info it's hard to say what can and cannot be done in Bugs.
Oct 13, 2014 at 21:54 comment added indiajoe Thank you for the help. That is exactly what I want to do. But my issue is how to define M(t,u,v). I cannot write it as a function of standard distributions available in BUGS. I need to write a function which reads from a pre-calculated grid of t,u,v. How do I accomplish that in BUGS?
Oct 13, 2014 at 21:51 history edited fileunderwater CC BY-SA 3.0
clarification and generalization
Oct 13, 2014 at 17:45 history answered fileunderwater CC BY-SA 3.0