View source: R/buildPlottingFrame.r
buildModelCI.default | R Documentation |
Construct Confidence Interval Values
## Default S3 method: buildModelCI( model, outerCI = 2, innerCI = 1, intercept = TRUE, numeric = FALSE, sort = c("natural", "magnitude", "alphabetical"), predictors = NULL, strict = FALSE, coefficients = NULL, newNames = NULL, trans = identity, decreasing = TRUE, name = NULL, interceptName = "(Intercept)", ... )
model |
A Fitted model such as from lm, glm |
outerCI |
How wide the outer confidence interval should be, normally 2 standard deviations. If 0, then there will be no outer confidence interval. |
innerCI |
How wide the inner confidence interval should be, normally 1 standard deviation. If 0, then there will be no inner confidence interval. |
intercept |
logical; Whether the Intercept coefficient should be plotted |
numeric |
logical; If true and factors has exactly one value, then it is displayed in a horizontal graph with continuous confidence bounds.; not used for now. |
sort |
Determines the sort order of the coefficients. Possible values are c("natural", "magnitude", "alphabetical") |
predictors |
A character vector specifying which variables to keep. Each individual variable has to be specified, so individual levels of factors must be specified. We are working on making this easier to implement, but this is the only option for now. |
strict |
If TRUE then predictors will only be matched to its own coefficients, not its interactions |
coefficients |
A character vector specifying which factor variables to keep. It will keep all levels and any interactions, even if those are not listed. |
newNames |
Named character vector of new names for coefficients |
trans |
A transformation function to apply to the values and confidence intervals. |
decreasing |
logical; Whether the coefficients should be ascending or descending |
name |
A name for the model, if NULL the call will be used |
interceptName |
Specifies name of intercept it case it is not the default of "(Intercept"). |
... |
See Details for information on |
Takes a model and builds a data.frame holding the coefficient value and the confidence interval values.
A data.frame
listing coefficients and confidence bands.
Jared P. Lander
coefplot
multiplot
data(diamonds, package='ggplot2') model1 <- lm(price ~ carat + cut, data=diamonds) coefplot:::buildModelCI(model1) coefplot(model1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.