estimate | R Documentation |
Estimate linear combinations from a regression model
estimate(fit, lambda, alpha = 0.05, t.test = inherits(fit, "lm"), trans)
fit |
A model with |
lambda |
Linear combination weights (numeric vector with length equal to number of coefficients in fit) |
alpha |
Error rate for confidence interval (default: 0.05) |
t.test |
Use t distribution for inference? (default: TRUE only if model is linear) |
trans |
Apply a transformation function to the results? (function) |
# Linear regression
fit <- lm(Ozone ~ Wind + Temp + Solar.R, airquality)
estimate(fit, c(0, 1, -1, 5))
# Logistic regression
DF <- as.data.frame(Titanic)
DF <- DF[rep(1:nrow(DF), DF$Freq),]
fit <- glm(Survived ~ Class + Sex + Age, DF, family=binomial)
estimate(fit, c(0, 1, -1, 0, 0, 0), trans=exp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.