loglinll | R Documentation |
This function provides a direct computation of the logarithm of the likelihood of a standard log-linear model, as defined in Chapter 4.
loglinll(beta, y, X)
beta |
coefficient of the logit model |
y |
vector of binary response variables |
X |
covariate matrix |
returns the logarithmic value of the logit likelihood 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))
loglinll(beta, y, X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.