lapl_aprx: Laplace approximation of posterior to normal

View source: R/Functions.R

lapl_aprxR Documentation

Laplace approximation of posterior to normal

Description

This function generates mode and variance-covariance for a normal proposal distribution for the bayesian logit.

Usage

lapl_aprx(y, x, glmobj = FALSE)

Arguments

y

the binary dependent variable y

x

the matrix of independent variables.

glmobj

logical for returning the logit glm object

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_aprx(y,x)


estsyawo/bayesdistreg documentation built on Jan. 28, 2024, 12:13 p.m.