Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

binary

Simulated data for a binary logistic regression and its MCMC samples


Description

Simulate a dataset with one explanatory variable and one binary outcome variable using (y ~ dbern(mu); logit(mu) = theta[1] + theta[2] * X). The data loads two objects: the observed y values and the coda object containing simulated values from the posterior distribution of the intercept and slope of a logistic regression. The purpose of the dataset is only to show the possibilities of the ggmcmc package.

Usage

data(binary)

Format

Two objects, namely:

s.binary

A coda object containing posterior distributions of the intercept (theta[1]) and slope (theta[2]) of a logistic regression with simulated data.

y.binary

A numeric vector containing the observed values of the outcome in the binary regression with simulated data.

Source

Simulated data for ggmcmc

Examples

data(binary)
str(s.binary)
str(y.binary)
table(y.binary)

ggmcmc

Tools for Analyzing MCMC Simulations from Bayesian Inference

v1.5.1.1
GPL-2
Authors
Xavier Fernández i Marín [aut, cre] (<https://orcid.org/0000-0002-9522-8870>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.