Learn R Programming

linea (version 0.1.1)

response_curves: response_curves

Description

Line chart of variable response curves

Usage

response_curves(
  model,
  x_min = NULL,
  x_max = NULL,
  y_min = NULL,
  y_max = NULL,
  interval = NULL,
  trans_only = FALSE,
  colors = color_palette(),
  plotly = TRUE,
  verbose = FALSE,
  table = FALSE,
  add_intercept = FALSE,
  points = FALSE
)

Value

a plotly line chart of the model's response curves

Arguments

model

Model object

x_min

number specifying horizontal axis min

x_max

number specifying horizontal axis max

y_min

number specifying vertical axis min

y_max

number specifying vertical axis max

interval

number specifying interval between points of the curve

trans_only

a boolean specifying whether to display non-linear only y = b*dim_rest(x)

colors

character vector of colors in hexadecimal notation

plotly

A boolean to specify whether to include use ggplot over plotly

verbose

A boolean to specify whether to print warnings

table

A boolean to specify whether to return a data.frame of the response curves

add_intercept

A boolean to specify whether to include the intercept whne calculating the curves

points

A boolean to specify whether to include the points from the data on the curve

Details

Line chart of variable response curves visualising the relationship of each independent variable with the dependent variable

Examples

Run this code
model = run_model(data = mtcars,dv = 'mpg',ivs = c('disp'))
model %>%
   response_curves()
model = run_model(data = mtcars,dv = 'mpg',ivs = c('wt','cyl','disp')) 

model %>%
   response_curves()
   
run_model(data = scale(mtcars) %>% 
              data.frame(),
          dv = 'mpg',
          ivs = c('wt','cyl','disp')) %>%
   response_curves()

Run the code above in your browser using DataLab