loglinnoinflpost {bayess} | R Documentation |
This function computes the logarithm of the posterior density associated with a log-linear model and the noninformative prior used in Chapter 4.
loglinnoinflpost(beta, y, X)
beta |
parameter of the log-linear model |
y |
binary response variable |
X |
covariate matrix |
This function does not test for coherence between the lengths of y
,
X
and beta
, hence may return an error message in case of
incoherence.
returns the logarithm of the logit posterior density for the data y
,
covariate matrix X
and parameter vector beta
X=matrix(rnorm(20*3),ncol=3)
beta=c(3,-2,1)
y=rpois(20,exp(X%*%beta))
loglinnoinflpost(beta, y, X)