plot.fuzzylm: Plot Fuzzy Linear Regression

View source: R/plot.fuzzylm.R

plot.fuzzylmR Documentation

Plot Fuzzy Linear Regression

Description

Plots the data and the central tendency with spreads of a fuzzy linear regression. For multiple regression, allows choice of which variable to display. Optionally colors the polygon for the regression.

Usage

## S3 method for class 'fuzzylm'
plot(
  x,
  y = NULL,
  choice = 1,
  res = 2,
  col.fuzzy = NA,
  length = 0.05,
  angle = 90,
  main = "method",
  xlab = NULL,
  ylab = NULL,
  ...
)

Arguments

x

a fuzzylm object.

y

NULL for plotting a fuzzylm object.

choice

an integer or character string specifying which explanatory variable to plot in a partial fit of a multiple regression.

res

an integer >= 2 specifying resolution of shading for the regression plot. Minimum resolution for shading the plot is 3.

col.fuzzy

color for shading of the regression plot.

length

length of the edges of the arrow head (in inches).

angle

angle from the shaft of the arrow to the edge of the arrow head.

main

a main title for the plot. Default title specifies method used to fit the model.

xlab

a label for the x axis, defaults to a description of x.

ylab

a label for the y axis, defaults to a description of y.

...

additional graphical parameters.

Details

Silently plots the data. Fuzzy numbers are plotted with points for the central value and arrows specifying spreads.

In case the x object contains a multiple fuzzy regression, the function plots a partial fit for one explanatory variable.

Value

No return value, called for side effects.

Examples

data(fuzzydat)
f = fuzzylm(y ~ x, fuzzydat$lee)
plot(f)
plot(f, res = 20, col.fuzzy = "red")

fuzzyreg documentation built on March 31, 2023, 9:19 p.m.