| coeff | R Documentation |
Confidence intervals and P-values for the linear regression model and the generalized linear model can be calculated using the ordinary model variance estimators. Through simply entering the output objects of lm or glm, the inference results are fastly computed. For the linear regression model, the exact confidence intervals and P-values based on the t-distribution are calculated. Also, for the generalized linear model, the Wald-type confidence intervals and P-values based on the asymptotic normal approximation are computed. The resultant coefficients and confidence limits can be transformed to exponential scales by specifying eform.
coeff(gm, eform=FALSE, cl=0.95, digits=4)
gm |
An output object of |
eform |
A logical value that specify whether the outcome should be transformed by exponential function (default: |
cl |
Confidence level for calculating confidence intervals (default: 0.95) |
digits |
Number of decimal places in the output (default: 4). |
Results of inferences of the regression coefficients using the ordinary model variance estimators.
coef: Coefficient estimates; transformed to the exponential scale if eform=TRUE.
SE: Robust standard error estimates for coef.
CL: Lower limits of confidence intervals.
CU: Upper limits of confidence intervals.
P-value: P-values for the coefficient tests.
data(exdata02)
gm1 <- glm(y ~ x1 + x2 + x3 + x4, data=exdata02, family=binomial)
coeff(gm1,eform=TRUE)
# Logistic regression analysis
# Coefficient estimates are translated to odds ratio scales
lm1 <- lm(x1 ~ x2 + x3 + x4, data=exdata02)
coeff(lm1)
# Linear regression analysis
data(mch)
if(requireNamespace("lme4", quietly = TRUE)) {
lmr1 <- lme4::lmer(Y ~ x + (1|SOUM), data=mch)
coeff(lmr1)
}
# Linear mixed-effects model analysis
if(requireNamespace("lme4", quietly = TRUE)) {
gmr1 <- lme4::glmer(y ~ x + (1|SOUM), nAGQ=25, family=binomial, data=mch)
coeff(gmr1, eform=TRUE)
}
# Logistic mixed-effects model analysis
# Coefficient estimates are translated to odds ratio scales
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.