coefplot (version 1.2.7)

buildPlottingPloty.default: buildPlottingPloty.default

Description

Builds the plotting structure for interactive coefplots

Usage

buildPlottingPloty.default(
  modelCI,
  title = "Coefficient Plot",
  xlab = "Value",
  ylab = "Coefficient",
  lwdInner = 3,
  lwdOuter = 1,
  color = "blue",
  shape = "circle",
  pointSize = 8
)

Arguments

modelCI

An object created by buildModelCI

title

The name of the plot, if NULL then no name is given

xlab

The x label

ylab

The y label

lwdInner

The thickness of the inner confidence interval

lwdOuter

The thickness of the outer confidence interval

color

The color of the points and lines

shape

The shape of the points

pointSize

Size of coefficient point

Value

a ggplot graph object

Details

Uses plotly to make an interactive version of coefplot. Still uses modelCI.

See Also

coefplot.default coefplot buildPlotting.default

Examples

Run this code
# NOT RUN {
data(diamonds)
mod1 <- lm(price ~ carat + cut, data=diamonds)
theCI1 <- coefplot:::buildModelCI(mod1)
coefplot:::buildPlottingPloty.default(theCI1)
coefplot(mod1, interactive=TRUE)
mod2 <- lm(mpg ~ cyl + qsec - 1, data=mtcars)
mod3 <- lm(mpg ~ cyl + qsec + disp - 1, data=mtcars)
theCI2 <- coefplot:::buildModelCI(mod2)
theCI3 <- coefplot:::buildModelCI(mod3)
coefplot::buildPlottingPloty.default(theCI2)
coefplot::buildPlottingPloty.default(theCI3)
coefplot(mod2, interactive=TRUE)
coefplot(mod3, interactive=TRUE)

mod4 <- glmnet::glmnet(
x=as.matrix(diamonds[, c('carat', 'x', 'y', 'z')]),
y=diamonds$price
)
coefplot(mod4, interactive=TRUE, lambda=0.65)

# }

Run the code above in your browser using DataCamp Workspace