Package 'shutterplot'

Title: The R Shutter Plot Package
Description: Shows the scatter plot along with the fitted regression lines. It depicts min, max, the three quartiles, mean, and sd for each variable. It also depicts sd-line, sd-box, r, r-square, prediction boundaries, and regression outliers.
Authors: Siddhanta Phuyal <[email protected]> Jyotirmoy Sarkar <[email protected]> Mamunur Rashid <[email protected]>
Maintainer: Siddhanta Phuyal <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-12-18 06:41:42 UTC
Source: CRAN

Help Index


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)

Numerical Summaries of a Shutter Plot

Description

displays numerical summaries of a shutter plot.

Usage

shutterplotsummary(x, y, getValue = FALSE)

Arguments

x

data for the explanatory/independent variable.

y

data for the response/dependent variable.

getValue

logical:FALSE (DEFAULT); to access the summary statistics of the shutter plot.

Value

Prints the numerical summaries in the console.

Examples

data1 <- rnorm(90,10,10)
  data2 <- data1 + rnorm(90,20,10)
  shutterplotsummary(data1,data2)

Numerical values of seven-number-summary.

Description

prints the numerical summaries in the console.

Usage

summary7(x)

Arguments

x

value(s) of a variable.

Value

prints the seven-number-summary in the console.

Examples

data <- rnorm(90,90,10)
  summary7(data)

seven-number-summary

Description

displays the seven-number-summary for a variable.

Usage

summary7plot(x)

Arguments

x

value(s) of a variable.

Value

depicts the seven-number-summary.

Examples

data<- rnorm(90,90,10)
  summary7plot(data)