getCoef | R Documentation |
This function generates point estimates and 95 regression model, for any combination of model parameters.
getCoef(m, par)
m |
A regression model (of class 'lm','glm','lmerMod','glmerMod' or 'coxph') |
par |
A matrix (or data.frame) specifying the parameter combinations. |
A data.frame with three columns: est
, lo
, hi
providing
the point estimate and lower/upper limits of the 95
parameter combination provided in par
. Thus the return value has the same
number of rows as par
.
The function supports objects of class 'lm' and 'glm', 'lmerMod' and 'glmerMod'
(mixed-effects models from package lme4
, for which only the
fixed-effects part is considered) and 'coxph' (from package survival
)
mydata <- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
mylogit <- glm(admit ~ gre + gpa + rank, data = mydata, family = "binomial")
pars <- data.frame(gpa=c(2,2,3), rank=c(3,4,4))
getCoef(mylogit, pars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.