Description Usage Arguments Value Examples

Performs Metropolis Hastings on the logistic regression model to draw sample from posterior. Uses a matched curvature Student's t candidate generating distribution with 4 degrees of freedom to give heavy tails.

1 2 3 4 5 |

`y` |
the binary response vector |

`x` |
matrix of covariates |

`steps` |
the number of steps to use in the Metropolis-Hastings updating |

`priorMean` |
the mean of the prior |

`priorVar` |
the variance of the prior |

`mleMean` |
the mean of the matched curvature likelihood |

`mleVar` |
the covariance matrix of the matched curvature likelihood |

`startValue` |
a vector of starting values for all of the regression coefficients including the intercept |

`randomSeed` |
a random seed to use for different chains |

`plots` |
Plot the time series and auto correlation functions for each of the model coefficients |

A list containing the following components:

`beta` |
a data frame containing the sample of the model coefficients from the posterior distribution |

`mleMean` |
the mean of the matched curvature likelihood. This is useful if you've used a training set to estimate the value and wish to use it with another data set |

`mleVar` |
the covariance matrix of the matched curvature likelihood. See mleMean for why you'd want this |

1 2 | ```
data(poissonTest.df)
results <- BayesPois(poissonTest.df$y, poissonTest.df$x)
``` |

Bolstad2 documentation built on May 29, 2017, 3:35 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.