fastGraph-package {fastGraph}R Documentation

Fast Drawing and Shading of Graphs of Statistical Distributions

Description

Provides functionality to produce graphs of probability density functions and cumulative distribution functions with few keystrokes, allows shading under the curve of the probability density function to illustrate concepts such as p-values and critical values, and fits a simple linear regression line on a scatter plot with the equation as the main title.

Details

Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA

See Also

Functions plot and lm, and R-package jmuOutlier.

Examples

par( mfrow=c(2,2) )

# Shows P(|Z| < 1.96), where Z is standard normal.
shadeDist( c(-1,1)*qnorm(0.975), lower.tail=FALSE )

# Shows P(|T| > 1.7), where T is t distributed with 19 d.f.
shadeDist( c(-1.7, 1.7), "dt", 19, col=c("blue", "hotpink") )

# Plots distribution of Poisson(mu=6).
plotDist( "dpois", 6, xmin=0, col="seagreen", main = expression(paste("Poisson(",mu,"=6)")) )

# Graphs line of simple linear regression model and states equation.
plotLine( c(-5,6,2,9,-11), c(-7,17,21,29,8), digits.intercept=3, digits.slope=4 )

par( mfrow=c(1,1) )

[Package fastGraph version 2.1 Index]