stan

Probit regression with data augmentation in stan

戏子无情 提交于 2019-12-03 16:27:47
I am attempting to do a probit model with data augmentation using stan. This is where we have outcomes y either 0/1 that tell us the sign of the latent variable ystar . This is what I have so far, but I'm not sure how to add information in the model section about y . Any thoughts? data { int<lower=0> N; // number of obs int<lower=0> K; // number of predictors int<lower=0,upper=1> y[N]; // outcomes matrix[N, K] x; // predictor variables } parameters { vector[K] beta; // beta coefficients vector[N] ystar; // latent variable } model { vector[N] mu; beta ~ normal(0, 100); mu <- x*beta; ystar ~

MC-Stan on Spark?

非 Y 不嫁゛ 提交于 2019-12-03 09:37:29
I hope to use MC-Stan on Spark , but it seems there is no related page searched by Google. I wonder if this approach is even possible on Spark, therefore I would appreciate if someone let me know. Moreover, I also wonder what is the widely-used approach to use MCMC on Spark. I heard Scala is widely used, but I need some language that has a decent MCMC library such as MC-Stan. Yes it's certainly possible but requires a bit more work. Stan (and popular MCMC tools that I know of) are not designed to be run in a distributed setting, via Spark or otherwise. In general, distributed MCMC is an area

How do I get standard errors of maximum-likelihood estimates in STAN?

邮差的信 提交于 2019-12-03 00:14:57
I am using maximum-likelihood optimization in Stan, but unfortunately the optimizing() function doesn't report standard errors: > MLb4c <- optimizing(get_stanmodel(fitb4c), data = win.data, init = inits) STAN OPTIMIZATION COMMAND (LBFGS) init = user save_iterations = 1 init_alpha = 0.001 tol_obj = 1e-012 tol_grad = 1e-008 tol_param = 1e-008 tol_rel_obj = 10000 tol_rel_grad = 1e+007 history_size = 5 seed = 292156286 initial log joint probability = -4038.66 Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes 13 -2772.49 9.21091e-005 0.0135987 0.07606 0.9845 15 Optimization terminated

Will RStan run on a supercomputer?

China☆狼群 提交于 2019-11-30 18:24:40
Stan is a new Bayesian analysis software by Gelman et al . RStan is, I am guessing, a way to call Stan from within R. Will Stan / RStan run on a supercomputer with a Linux operating system, and if so can it take advantage of the super-computer's multi-processors? I have been told that WinBUGS will not run on a Linux machine and/or cannot take advantage of a supercomputer's multi-processors. I am looking for a way to speed up Bayesian analyses - from weeks to days / hours. Stan and rstan should run on Linux, Mac, or Windows that supports the dependencies. We have not tested on BSD or Oracle,

Will RStan run on a supercomputer?

二次信任 提交于 2019-11-30 03:16:26
问题 Stan is a new Bayesian analysis software by Gelman et al. RStan is, I am guessing, a way to call Stan from within R. Will Stan / RStan run on a supercomputer with a Linux operating system, and if so can it take advantage of the super-computer's multi-processors? I have been told that WinBUGS will not run on a Linux machine and/or cannot take advantage of a supercomputer's multi-processors. I am looking for a way to speed up Bayesian analyses - from weeks to days / hours. 回答1: Stan and rstan