ewan-keith / rstansim Goto Github PK
View Code? Open in Web Editor NEWR package for running simulation studies with stan
License: GNU General Public License v3.0
R package for running simulation studies with stan
License: GNU General Public License v3.0
Hi @Ewan-Keith, as I mentioned in the email I sent a while back we will be releasing a major update to the loo package (this week I hope) and I wanted to follow up and give you a bit more detail specific to your package. In order to accommodate some new features, the structure of the object returned by loo()
is changing slightly. In your case I think you only need to make a few small tweaks to rstansim.
The new loo
objects will have a component estimates
which is a matrix from which you can pull the required info. For example, if loo_obj
is the result from a call to loo
then loo_obj$estimates
will be a matrix like this:
Estimate SE
elpd_loo -83.614057 4.289943
p_loo 3.353629 1.159908
looic 167.228115 8.579885
So in your fit_models-utilities
file, you can replace these lines
rstansim/R/fit_models-utilities.R
Lines 167 to 183 in 02593d4
with something like this:
loo_est_matrix <- loo_1$estimates
loo_output <- data.frame(
parameter = rep(rownames(loo_est_matrix), 2),
estimate = rep(c("estimate", "se"), each = 3),
value = c(loo_est_matrix)
)
I think that's basically all you need to do, unless there are other files in the package that also compute loo
, in which case the same thing applies.
I will send a follow-up email once the loo update is on CRAN but until then you can install it from the master branch at stan-dev/loo
if you want to test.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.