calc.like {genpwr} | R Documentation |
Function to Calculate Log Likelihood for a Logistic Regression Model
Description
Convenience function to calculate the log likelihood of a specified model.
Usage
calc.like(beta, t, model)
Arguments
beta |
Vector of logistic regression coefficients. |
t |
A 2x3 table of joint probabilities of disease and genotype. Rows = case vs. control, columns=genotype. |
model |
The genetic model in the logistic regression: "Dominant", "Additive", "Recessive", "2df" or "null" |
Value
The log likelihood.
Examples
t <- rbind(c(0.2967437, 0.1806723, 0.02258404),
c(0.3432563, 0.1393277, 0.01741596))
calc.like(logistic.mles(t, "Dominant"), t, model="Dominant")
[Package genpwr version 1.0.4 Index]