This function plots a probability density function of a sample proportion, shades the area under the curve, and computes the probability.

1 2 3 |

`xshade` |
A single number or vector of two numbers, denoting values on the x-axis where shading under the curve begins and ends. |

`size` |
Number of Bernoulli trials (one or more). |

`prob` |
Probability of Bernoulli success. |

`lower.tail` |
Logical; if |

`xlab` |
The label given to the sample proportion on the x-axis. |

`xmin` |
The minimum x-value to be graphed. |

`xmax` |
The maximum x-value to be graphed. |

`xtic` |
Logical or a vector of numbers.
If |

`digits.prob` |
The number of significant digits listed in the probability. |

`digits.xtic` |
The number of significant digits listed on the x-axis. |

`main` |
The main title given for the graph. |

`col` |
A vector of size two, specifying the colors of the density curve and the shading, respectively. |

`lwd` |
The line width illustrating the discrete probabilities. |

`...` |
Optional arguments to be passed to the |

When illustrating a left-sided p-value or any other left-sided probability,
`xshade`

should be a single number and set `lower.tail=TRUE`

(default).
When illustrating a right-sided p-value or any other right-sided probability,
`xshade`

should be a single number and set `lower.tail=FALSE`

.
When illustrating a two-sided p-value or any other two-sided probability,
`xshade`

should be a vector of two numbers and set `lower.tail=TRUE`

(default).
When illustrating the complement of a two-sided p-value or the complement of any other two-sided probability,
`xshade`

should be a vector of two numbers and set `lower.tail=FALSE`

.

This function `shadePhat`

can be executed directly or indirectly via `shadeDist`

.

This function `shadePhat`

calls functions
`plot`

and `curve`

.

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

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.