Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Code for Schnell, Tang, Offen & Carlin, "A Bayesian credible subgroups approach to identifying subgroups with positive treatment effects." Biometrics (2016)
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
FILES: - alzheimers.csv: Contains cleaned data for the Alzheimer's disease example. - bayes-linear.R: Defines functions related to the methods described in the paper. - decomp.R Produces estimate, standard error, and observation plots used in example analysis. - example.R: Reproduces the Alzheimer's disease example analysis. - simulate.R: Reproduces the simulation study. TO RUN ALZHEIMER'S DISEASE ANALYSIS: - Packages required: MASS, Matrix, matrixcalc, matrixStats, mvtnorm, plotrix, vcd. - Make sure working directory is set to the directory containing the R scripts. - Run example.R. - To reproduce the decomposition plots, run decomp.R. TO RUN SIMULATION STUDY: - Packages required: MASS, Matrix, matrixcalc, matrixStats, mvtnorm, BayesTree. - Make sure working directory is set to the directory containing the R scripts. - Run simulate.R. This may take several hours. - Simulation results are saved in tables-n.RData, where n is the sample size (default 40). TO ANALYZE A NEW DATASET: - Load bayes-linear.R - Defaults: call blm() with syntax used by lm(). - Custom prior: call blm(..., design=TRUE) to get the design matrix, and specify hyperparameters accordingly. - Create grid approximating the covariate space of interest. - Call the find.credible.subgroups function. - See example.R for an example use.