fastGraph-package: Fast Drawing and Shading of Graphs of Statistical...

Description Details Author(s) See Also Examples

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

Package: fastGraph
Type: Package
Version: 1.1
Date: 2016-07-07
License: GPL-3

Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA; GARRENST AT JMU DOT EDU

See Also

plot and lm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Plots cumulative distribution functions of a standard normal, a central t with 4 d.f., 
# and a t with 4 d.f. and non-centrality parameter = 1.3 in black, red, and green, respectively. 
plotDist( "pnorm", 0, 1, "pt", 4, 0, "pt", 4, 1.3 )

# Plots Binomial(n=100,p) density functions, where p=0.4, 0.5, and 0.7
# in colors black, red, and green, respectively.
plotDist( "dbinom", 100, 0.4, "dbinom", 100, 0.5, "dbinom", 100, 0.7 ) 

# Shows P(|T| > 1.8), where T is t distributed with 9 d.f.
shadeDist( c(-1.8, 1.8), "dt", 9 ) 

# Shows P(X > 8), where X ~ Poisson(mean=6).
shadeDist( 8, "dpois", 6, lower.tail=FALSE, col=c("purple","green") ) 

# 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 )  

# Finds a reasonable domain when plotting a Normal(mean=20, sd=5) density function.
getMinMax( , , "dnorm", 20, 5 )

fastGraph documentation built on May 30, 2017, 3:38 a.m.

Search within the fastGraph package
Search all R packages, documentation and source code