sim_post_normal: Obtain posterior simulations using a normal prior on the...

Description Usage Arguments References

Description

sim_post_normal() uses a Metropolis algorithm to obtain posterior simulations using a normal prior on the separating variable and improper, uinform priors on the remaining variables.

Usage

1
2
3
sim_post_normal(formula, data, sep_var, sd = 4.5, n_sims = 1000,
  n_burnin = n_sims/2, n_thin = 1, n_chains = 3, n_cores = n_chains,
  tune = 1)

Arguments

formula

A logistic regression model.

data

A data frame.

sep_var

The name of the separating variable.

sd

The standard deviation of the normal prior on the coefficient for the separating variable.

n_sims

The number of simulations after the burn-in period.

n_burnin

The number of burn-in iterations for the sample.

n_thin

The thinning interval used in the simulation. The number of MCMC iterations must be divisible by this value.

n_chains

The number of MCMC chains being run.

n_cores

The number of MCMC cores. Defaults to the number of chains.

tune

The tuning parameter for the Metropolis sampling. Can be either a positive scalar or a (k+1)-vector, where k is the number of variables in the model. Presently passed to MCMCmetrop1R.

References

Rainey, Carlisle. "Dealing with Separation in Logistic Regression Model." Working paper. Available at http://crain.co/papers/separation.pdf.


carlislerainey/separation documentation built on May 13, 2019, 12:45 p.m.