plot.regress: Plot method for the regress function

Description Usage Arguments Details See Also Examples

View source: R/regress.R

Description

Plot method for the regress function

Usage

1
2
3
## S3 method for class 'regress'
plot(x, plots = "", lines = "", conf_lev = 0.95,
  intercept = FALSE, shiny = FALSE, custom = FALSE, ...)

Arguments

x

Return value from regress

plots

Regression plots to produce for the specified regression model. Enter "" to avoid showing any plots (default). "dist" to shows histograms (or frequency bar plots) of all variables in the model. "correlations" for a visual representation of the correlation matrix selected variables. "scatter" to show scatter plots (or box plots for factors) for the response variable with each explanatory variable. "dashboard" for a series of six plots that can be used to evaluate model fit visually. "resid_pred" to plot the explanatory variables against the model residuals. "coef" for a coefficient plot with adjustable confidence intervals. "leverage" to show leverage plots for each explanatory variable

lines

Optional lines to include in the select plot. "line" to include a line through a scatter plot. "loess" to include a polynomial regression fit line. To include both use c("line","loess")

conf_lev

Confidence level used to estimate confidence intervals (.95 is the default)

intercept

Include the intercept in the coefficient plot (TRUE, FALSE). FALSE is the default

shiny

Did the function call originate inside a shiny app

custom

Logical (TRUE, FALSE) to indicate if ggplot object (or list of ggplot objects) should be returned. This opion can be used to customize plots (e.g., add a title, change x and y labels, etc.). See examples and http://docs.ggplot2.org/ for options.

...

further arguments passed to or from other methods

Details

See https://radiant-rstats.github.io/docs/model/regress.html for an example in Radiant

See Also

regress to generate the results

summary.regress to summarize results

predict.regress to generate predictions

Examples

1
2
3
4
5
6
7
8
9
result <- regress("diamonds", "price", c("carat","clarity"))
plot(result, plots = "coef", conf_lev = .99, intercept = TRUE)
plot(result, plots = "dist")
## Not run: 
plot(result, plots = "scatter", lines = c("line","loess"))
plot(result, plots = "resid_pred", lines = "line")
plot(result, plots = "dashboard", lines = c("line","loess"))

## End(Not run)

radiant.model documentation built on May 19, 2017, 9:56 p.m.

Search within the radiant.model package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.