Coder Social home page Coder Social logo

compops / panel-dpm2016 Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 37.65 MB

Approximate Bayesian inference for mixed effects models with heterogeneity

Home Page: http://www.johandahlin.com/research/

License: GNU General Public License v3.0

R 100.00%
panel-data gibbs-sampler mixed-effects sparseness-priors

panel-dpm2016's Introduction

panel-dpm2016

This code was downloaded from < https://github.com/compops/panel-dpm2016 > and contains the code used to produce the results in the technical report

J. Dahlin, R. Kohn and T. B. Schön, Bayesian inference for mixed effects models with heterogeneity. Technical report LiTH-ISY-R-3091, Department of Electrical Engineering, Linköping University. March 2016.

The report is available from < http://www.johandahlin.com/files/publications/dahlin-panel-dpm2016.pdf >.

Requirements

The code is written and tested for R 3.2.3. To run the code, you need to have mvtnorm, lme4 and RColorBrewer installed, which amounts to executing the command

install.packages(c("mvtnorm","RColorBrewer","lme4"))

Main script files

Please, make sure that the working directory is the same as the directory in which the following .R-files are found. Otherwise, the code will not run as the subroutines implementing the Gibbs samplers cannot be loaded.

example1-mixture-normals/example1-run-comparison.R This script recreates the example in Section 4.1 together with Figure 1.

example2-mixedeffects/example2-run-comparison.R This script estimates the model in Section 4.2 for a specific N and T. It was used for verfying the code before running the simulation study. Hence, the settings can differ slightly from the ones indicated in the report.

example2-mixedeffects/example2-run-gamma.R This script recreates the simulation study presented in Section 4.2. It is run from the command line by executing

R CMD BATCH --no-save --no-restore '--args jj=XXX' example2-run-gamma.R

for XXX from 1 to 40 to get 40 independent runs. Please, make sure that the working directory set in the file is correct before executing the script. Also, make sure to run the data generating script (discussed below) before running this file.

example3-reactiontest/example3-reactiontest.R This script replicats the results of Setion 4.3.

example2-mixedeffects/example2-generate-datasets.R This script generates the data sets for the simulation study in Section 4.2.

example2-mixedeffects/example2-computeLL.R This script computes Tables 1 from the output of the simulation script (discussed above).

example2-mixedeffects/example2-mixedeffects-plots.R This script recreates Figure 2 from the output of the simulation script (discussed above).

example3-reactiontest/example3-data.R This script recreates Figure 3.

Supporting files

example1-mixture-normals/samplers-normalmixture.R Gibbs samplers for the finite mixture model and the DPM model in Section 4.1.

example2-mixedeffects/samplers-mixedeffects-1dim.R Gibbs samplers for the finite mixture model and the DPM model in Section 4.2.

example3-reactiontest/samplers-mixedeffects-sleepmodel.R Gibbs samplers for the finite mixture model and the DPM model in Section 4.3.

panel-dpm2016's People

Contributors

compops avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.