powered by
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)
returns the logarithmic value of the logit likelihood for the data y, covariate matrix X and parameter vector beta
y
X
beta
coefficient of the logit model
vector of binary response variables
covariate matrix
X=matrix(rnorm(20*3),ncol=3) beta=c(3,-2,1) y=rpois(20,exp(X%*%beta)) loglinll(beta, y, X)
Run the code above in your browser using DataLab