Parameter Estimation using ADVI

Hi there,

Could you please help me in figuring out a parameter estimation stan program using ADVI.
For example, I am using a model:
Y = a * x2 + b * x3
Where ‘a’ and ‘b’ are my parameters. For MCMC I use data which contains Observed Y, x and error in Y(sigma). I define a chi sq equation (Y_therotical - Y_obsereved/ sigma)**2. Also uses a flat prior for this parameters.

Here is an example in EMCEE code: http://dfm.io/emcee/current/user/line/

Can I do same likelihood, prior settings and get parameters in stan using ADVI?

Sure, in Stan you write a program for the log density and the rest is taken care of. You might want to start by looking at some of the manual examples, they’re very thorough about explaining the language. Please post again if you have trouble getting going with one of those.