Construct Confidence Interval Values
# S3 method for default
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)", ...)
A Fitted model such as from lm, glm
How wide the outer confidence interval should be, normally 2 standard deviations. If 0, then there will be no outer confidence interval.
How wide the inner confidence interval should be, normally 1 standard deviation. If 0, then there will be no inner confidence interval.
logical; Whether the Intercept coefficient should be plotted
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.
Determines the sort order of the coefficients. Possible values are c("natural", "magnitude", "alphabetical")
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.
If TRUE then predictors will only be matched to its own coefficients, not its interactions
A character vector specifying which factor variables to keep. It will keep all levels and any interactions, even if those are not listed.
Named character vector of new names for coefficients
A transformation function to apply to the values and confidence intervals. identity
by default. Use invlogit
for binary regression.
logical; Whether the coefficients should be ascending or descending
A name for the model, if NULL the call will be used
Specifies name of intercept it case it is not the default of "(Intercept").
See Details for information on factors
, only
and shorten
A data.frame
listing coefficients and confidence bands.
Takes a model and builds a data.frame holding the coefficient value and the confidence interval values.
# NOT RUN {
data(diamonds, package='ggplot2')
model1 <- lm(price ~ carat + cut, data=diamonds)
coefplot:::buildModelCI(model1)
coefplot(model1)
# }
Run the code above in your browser using DataLab