Learn R Programming

fdm2id (version 0.9.6)

regplot: Plot function for a regression model

Description

Plot a regresion model on a 2-D plot. The predictor x should be one-dimensional.

Usage

regplot(model, x, y, margin = 0.1, ...)

Arguments

model

The model to be plotted.

x

The predictor vector.

y

The response vector.

margin

A margin parameter.

...

Other graphical parameters

Examples

Run this code
require (datasets)
data (cars)
model = POLYREG (cars [, -2], cars [, 2])
regplot (model, cars [, -2], cars [, 2])

Run the code above in your browser using DataLab