rich-payne / dreamer Goto Github PK
View Code? Open in Web Editor NEWAn R package to fit Bayesian model averaging of (possibly longitudinal) dose-response models.
Home Page: https://rich-payne.github.io/dreamer
License: Other
An R package to fit Bayesian model averaging of (possibly longitudinal) dose-response models.
Home Page: https://rich-payne.github.io/dreamer
License: Other
Some of the equations are not rendering. Perhaps move them to the vignette, and then reference the vignette in the README.
library(dreamer)
mcmc <- dreamer_mcmc(
data = NULL,
model_independent_binary(
mu_b1 = c(0, 0),
sigma_b1 = c(5, 5),
doses = c(0, 1),
link = "logit"
)
)
#> Warning in names(model_list)[i] <- paste0("model_", i, "_",
#> class(model_list[[i]])): number of items to replace is not a multiple of
#> replacement length
#> model_1_dreamer_independent_binary
#> start : 2022-10-27 09:26:19.981
#> Compiling model graph
#> Resolving undeclared variables
#> Allocating nodes
#> Graph information:
#> Observed stochastic nodes: 0
#> Unobserved stochastic nodes: 2
#> Total graph size: 11
#>
#> Initializing model
#> finish: 2022-10-27 09:26:20.026
#> total : 0.04 secs
Created on 2022-10-27 by the reprex package (v2.0.1)
Rather than try to name the models, an error should be thrown requiring the user to name the arguments.
May need to change versions, e.g., r-lib/actions#552, https://github.com/omnideconv/SimBu/actions/runs/2207112235/workflow#L45
We just learned about a real-world clinical use case that will probably want to use dreamer
and needs to adjust for covariates. Sound feasible to add to the dreamer
models?
Show off new features of #24.
To make it clear that sigma is a standard deviation.
Error is generated for independent models, but the error is not informative. For binary models, ensure values are 0/1.
library(dreamer)
data <- data.frame(dose = factor(1:2), response = 11:12)
dreamer_mcmc(
data,
mod = model_independent(
mu_b1 = rep(0, 2),
sigma_b1 = rep(1, 2),
doses = c(1, 2),
shape = 1,
rate = .01
)
)
#> mod
#> start : 2021-08-26 15:37:02.000
#> Error: Doses specified do not match doses in data
Created on 2021-08-26 by the reprex package (v0.3.0)
This dreamer class may be redundant.
Line 115 in 033ba63
Easiest with usethis::use_github_action("pkgdown")
.
This could be a simple wrapper called model_hyper_emax
. This would be an alternative to "hacking" the prior of b4
to be N(0, .00001^2) or similar in the emax model.
Bug when plotting data with an individual model. Occurs because attr(x, "response_type") is null for individual models.
These are currently stochastic and time-consuming.
e.g. dreamer_mcmc()
Update EMAX parameterization to match standard MCP-Mod form (see: https://cran.r-project.org/web/packages/DoseFinding/DoseFinding.pdf)
This will make the visual comparison better and avoid overlapping lines.
jags_rng, jags_seed
E.g. avoid things like any(grepl("binary", class(x)))
.
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.