plot.binDesign: Plot Results of binDesign

Description Usage Arguments Value See Also Examples

Description

Plot function to visualize the power curve.

Usage

1
2
## S3 method for class 'binDesign'
plot(x, ...)

Arguments

x

an object of class "binDesign, as can be created by link{binDesign}"

...

plot parameters as described in par

Value

A plot.

See Also

binPower for calculation of power

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Find a sample size for which the power to reject
# H0: p >= 0.1 in favor of HA: p < 0.1 
# is at least 0.9 (90 percent) in case that 
# the true proportion is 0.04 (i.e. an absolute delta 
# of 0.06 to the threshold proportion p.hyp=0.1)
# The exact one sided Clopper-Pearson CI shall be used
#  with default confidence level = 0.95.


sasi<-binDesign( nmax=200, delta=0.06, p.hyp=0.1,
 alternative="less", method="CP", power=0.9)

sasi

# Plot the result
 
# plot(sasi)


# for larger sample sizes this can be very time consuming.
# Better to use only a smaller range of n then:

sasi<-binDesign( nmax=c(200,300), delta=0.03, p.hyp=0.1,
 alternative="less", method="CP", power=0.9)

plot(sasi)

binGroup documentation built on May 30, 2017, 5:35 a.m.