buildPlottingPloty.default: buildPlottingPloty.default

View source: R/buildPlotPlotly.r

buildPlottingPloty.defaultR Documentation

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

Details

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

Value

a ggplot graph object

Author(s)

Jared P. Lander

See Also

coefplot.default coefplot buildPlotting.default

Examples


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)


coefplot documentation built on March 18, 2022, 7:58 p.m.