Giter Site home page Giter Site logo

tdyachenko / bahm-mediation Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 83.84 MB

Bayesian Analysis of Heterogeneous Mediation (BAHM)

Home Page: https://bayesianmediationanalysis.shinyapps.io/BAHM/

R 99.79% HTML 0.21%
bayesian-analysis consumer-research heterogeneity mediation

bahm-mediation's Introduction

Bayesian Analysis of Heterogeneous Mediation (BAHM)

This project hosts code for Bayesian heterogeneous mediation described in

Tatiana L Dyachenko, Greg M Allenby (2023), Is Your Sample Truly Mediating? Bayesian Analysis of Heterogeneous Mediation (BAHM), Journal of Consumer Research, 50(1), p.116-141. https://doi.org/10.1093/jcr/ucac041

(new code for categorical outcome (y) and mediator (m) variables is coming soon)

You can get an R package "bahm" following the instructions below. This will open the application on your device.

  1. You need to have R installed on your computer:

  2. Open file called LinesToLoad_BAHM.R and follow the instructions in the file (3 lines)

## Install needed libraries 
install.packages(c("shiny", "bayesm", "HDInterval", "coda", "gtools","dplyr", "readr", "DT", "future", "promises", "ipc", "future.callr",
                   "future.apply", "data.table", "shinyWidgets", "devtools","htmltools", "shinydashboard","shinyjs"))

## Getting the package from github
devtools::install_github("tdyachenko/BAHM-Mediation", ref = "r-pkg",force = TRUE)

## Loading the package 
library(bahm)

## Starting the app on your device
run_bahm()

Alternatively, the app can be run as a web application, but it might be much slower. https://bayesianmediationanalysis.shinyapps.io/BAHM/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.