posterior computes the value of the posterior at parameter values pars

posterior(pars, data, Log = TRUE, mu = 0, sig = 25,
  prior = "Normal")

Arguments

pars

parameter values

data

dataframe. The first column must be the binary dependent variable

Log

logical to take the log of the posterior.(defaults to TRUE)

mu

mean of prior of each parameter value in case the prior is Normal (default: 0)

sig

standard deviation of prior of each parameter in case the prior is Normal (default: 25)

prior

string input of "Normal" or "Uniform" prior distribution to use

Value

val value function of the posterior

Examples

y = indicat(faithful$waiting,mean(faithful$waiting)) x = scale(cbind(faithful$eruptions,faithful$eruptions^2)) data = data.frame(y,x) posterior(rep(0,3),data,Log = FALSE,mu=0,sig = 10,prior = "Normal") # no log
#> [1] 8.367031e-87
posterior(rep(0,3),data,Log = TRUE,mu=0,sig = 10,prior = "Normal") # log
#> [1] -198.2006
posterior(rep(0,3),data,Log = TRUE) # use default values
#> [1] -200.9495