plot.htest | R Documentation |
This is a generic function to depict the p-value area for a object with class htest
.
## S3 method for class 'htest'
plot(x, col = "red", shade.col = "red", cex = 0.8, from = NULL, to = NULL, ...)
x |
Object of class “htest”. |
col |
color for the observed statistic. |
shade.col |
color for the shaded area. |
cex |
a numerical value giving the amount by which plotting the p-value. |
from |
the minimum value of the X-axis. |
to |
the maximum value of the X-axis. |
... |
Other plotting parameters to affect the plot. |
None. Function produces a plot.
# Example
# H0: mu = 170
# Ha: mu != 170 with sigma2=25
x <- rnorm(n=80, mean=171, sd=5)
res <- z.test(x=x, mu=170, sigma2=25, alternative='two.sided')
res
plot(res, col='blue', shade.col='tomato')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.