Description Usage Arguments Details See Also Examples
Create plots of various average errors as a function of the sample size calculated via the Bayesian Average Error based approach.
1 2 3 |
x |
BAEssd object. Result from a Bayesian Average Error based sample size calculation. |
y |
Character string. Indicates what type of error should be plotted on the y-axis (default being Total Error). One of "TE","TWE","AE1", or "AE2". |
alpha.line |
Boolean. If |
type, xlab, ylab, main |
Character string. See |
... |
Additional parameters to be passed to plotting functions. |
Each BAEssd
object contains a history of the Average Errors for each
sample size considered. plot.BAEssd
allows for examination of the
trend in errors as the sample size changes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ############################################################
# Construct a plot of the Total Error as a function of
# sample size for a one-sample normal experiment with known
# variance.
# load suite of functions
f1 <- norm1KV.2sided(sigma=5,theta0=0,prob=0.5,mu=2,tau=1)
# get TE for many more sample sizes larger than the optimal
attach(f1)
ss1 <- ssd.norm1KV.2sided(alpha=0.25,w=0.5,minn=2,maxn=200,all=TRUE)
ss1
detach(f1)
# create plot of Total Error
plot(ss1)
# create plot of Average Type-I Error
plot(ss1,y="AE1",alpha.line=FALSE)
abline(h=0.05,lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.