shutterplot {shutterplot} | R Documentation |
Shutter Plot
Description
This function depicts the elements of a simple linear regression model.
Usage
shutterplot(
x,
y,
main = "Shutter Plot",
regbound = TRUE,
wspace = 0.1,
alpha = 0.05,
locationOfnStar = 1,
nprint = TRUE,
colOfPoints = "grey68",
xlab = "x",
ylab = "y",
regOutliers = TRUE,
pch = 20,
cex = 0.7,
las = 1
)
Arguments
x |
data for the explanatory/independent variable. |
y |
data for the response/dependent variable. |
main |
the title for the shutter plot. |
regbound |
logical: TRUE (Default), if you want the prediction boundaries; FALSE, otherwise. |
wspace |
white space to the left and the right of the plot. The default is 0.1 (10 percent of the range of x). |
alpha |
level of significance for prediction boundaries. The default value is 0.05 (97.5 percentile of a T-distribution with df = n-2. |
locationOfnStar |
binary: -1 for left; 1 (Default) for right. |
nprint |
logical: TRUE (Default), to print the sample size; FALSE, otherwise. |
colOfPoints |
The default is "grey68". Choose any color. |
xlab |
name of the x variable. |
ylab |
name of the y variable. |
regOutliers |
logical: TRUE (Default), to circle the regression outliers; FALSE, to skip. |
pch |
Either an integer specifying a symbol or a single character to be used as the default in plotting points. See points for possible values and their interpretation. Note that only integers and single-character strings can be set as a graphics parameter (and not NA nor NULL). The default value is 20. |
cex |
A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default 0.7. |
las |
numeric in 0,1,2,3; the style of axis labels.' 0: always parallel to the axis [default], 1:always horizontal, 2:always perpendicular to the axis, 3:always vertical. |
Value
Draws the shutter plot.
Examples
data1<- rnorm(90,10,10)
data2<- data1+rnorm(90,20,10)
shutterplot(data1,data2,regbound = TRUE,
wspace = 0.1, alpha = 0.05,
locationOfnStar = 1, nprint = TRUE, colOfPoints ="grey68",
xlab = "data1", ylab = "data2", regOutliers = TRUE)
shutterplot(data1,100-data2)