cmdStan output to R, or dev branch in Rstan

Hey guys -

What’s the easiest way to read cmdstan into R from optimization output (I can use linux or some for loops), But more important: how can I just dump my dev stan math into Rstan? I’m using some of my own functions (i.e. kernels) that aren’t available in Rstan, so I’m need to make my Rstan ‘dev’ friendly. I haven’t dived into this yet, but links or hints would be appreciated (i.e. setting up pathways or whatever). This would just save me time. Is this enough info?

Isn’t it just a CSV file with some comments? What do you need out of it?

I just need the point estimates for hyper parameters, and then the predictive distributions. I can sed away at it or with a simple python script. This isn’t too much of an issue. More important is getting the dev into RStan (or may be pystan).

I’ll have a look at part 1 right now.

Just read in the CSV file, then. It will have a header for parameter names and values for the iterations, I think.

has to do with this issue. it doesn’t like nan and quantiles are irrelevant in this setting when we’re using MAP (i think with BFGS we’re optimizing parameters jointly, is MAP the correct way to think about this?).

it’s pretty simple actually, just a little obnoxious, for optimization I need to extract the output and write stan code to re calculate the kernel and predictive distribution with the point estimates. This is probably not making me look professional, just gambling with time really, this is process is not replicable, it’s just for model checking. It’s probably less time to go ahead and figure out how to get it to work with R but I’ll do this a couple times on reduced size to make sure I have something comprehensible.

Edit: yeah this isn’t going to work I need the kernels and functions I wrote in Rstan, or else I have to code everything in stan code, so I guess I’ll just figure out the Rstan part, as this might be faster, and is necessary anyway.

I think R’s read.csv should work.

wow! overlooking simple things, every day!