plot.binDesign {binGroup}R Documentation

Plot Results of binDesign

Description

Plot function to visualize the power curve.

Usage

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


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



[Package binGroup version 2.2-1 Index]