Description Usage Arguments Value Examples
posterior
computes the value of the posterior at parameter values pars
1 2 |
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 |
val value function of the posterior
1 2 3 4 5 6 | 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
posterior(rep(0,3),data,Log = TRUE,mu=0,sig = 10,prior = "Normal") # log
posterior(rep(0,3),data,Log = TRUE) # use default values
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.