lapl_aprx2 {bayesdistreg}R Documentation

Laplace approximation of posterior to normal

Description

lapl_aprx2 is a more flexible alternative to lapl_aprx. This creates glm objects from which joint asymptotic distributions can be computed.

Usage

lapl_aprx2(y, x, family = "binomial", ...)

Arguments

y

the binary dependent variable y

x

the matrix of independent variables.

family

a parameter to be passed glm(), defaults to the logit model

...

additional parameters to be passed to glm()

Value

val A list of mode variance-covariance matrix, and scale factor for proposal draws from the multivariate normal distribution.

Examples

y = indicat(faithful$waiting,mean(faithful$waiting)) 
x = scale(cbind(faithful$eruptions,faithful$eruptions^2))
(gg<- lapl_aprx2(y,x)); coef(gg); vcov(gg)


[Package bayesdistreg version 0.1.0 Index]