Description Usage Arguments Value Author(s) See Also Examples
Modified version of the confint
function,
which displays the coefficients in addition to the CIs, and allows
for more control on display parameters. A plot
argument and
function allow to graph the coefficients and their CIs.
1 2 3 4 5 6 |
order |
Logical. If |
groups |
A |
plot |
Whether to plot the results. |
... |
Further arguments passed to |
x |
A |
mar |
The number of lines of margin, can be useful if the
coefficient names do not fit in the left margin. See
|
col |
The color of each coefficient + CI; gray by default. If
|
main |
The title of the plot. |
pch |
The symbol to be used for the points. See
|
add.signif |
Logical, whether to add an asterik for variables with CIs non-overlapping with zero. |
... |
Further arguments passed to |
A data frame providing the CI and coefficients.
Mathieu Basille basille@ufl.edu
confint
for more details on other
parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Example of linear model
fit <- lm(100/mpg ~ disp + hp + wt + am, data = mtcars)
## Standard 'confint' function
stats::confint(fit)
## Same results with modified function
confint(fit)
## Argument 'level'
stats::confint(fit, level = .9)
confint(fit, level = .9)
## Argument 'order'
confint(fit, order = TRUE)
## Argument 'groups'
confint(fit, groups = c(3, 1, 1, 1, 2))
## Argument 'level', "'order' and 'groups' simultaneously
confint(fit, level = .9, order = TRUE, groups = c(3, 1, 1, 1, 2))
## Argument 'parm'
stats::confint(fit, "am")
confint(fit, "am")
##'
## Plot of the results
plot(confint(fit, order = TRUE, groups = c(3, 1, 1, 1, 2)))
confint(fit, order = TRUE, groups = c(3, 1, 1, 1, 2), plot = TRUE)
confint(fit, order = TRUE, groups = c(3, 1, 1, 1, 2), plot = TRUE,
col = c("blue", "red", "green"), pch = 18, cex = 2)
confint(fit, order = TRUE, groups = c(3, 1, 1, 1, 2), level = 0.9,
plot = TRUE, add.signif = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.