Learn R Programming

seqtest (version 0.1-0)

print.sim.seqtest.cor: Print sim.seqtest

Description

This function prints the sim.seqtest.cor object

Usage

## S3 method for class 'sim.seqtest.cor':
print(x, ...)

Arguments

x
sim.seqtest.cor object.
...
further arguments passed to or from other methods.

References

Schneider, B., Rasch, D., Kubinger, K. D., & Yanagida, T. (2015). A Sequential triangular test of a correlation coefficient's null-hypothesis: 0 $< \rho \le \rho$0. Statistical Papers, 56, 689-699.

See Also

sim.seqtest.cor, plot.sim.seqtest.cor

Examples

Run this code
#---------------------------------------------
# Determine optimal k and nominal type-II-risk
# H0: rho <= 0.3, H1: rho > 0.3
# alpha = 0.01, beta = 0.05, delta = 0.25

# Step 1: Determine the optimal size of subsamples (k)

sim.obj <- sim.seqtest.cor(rho.sim = 0.3, k = seq(4, 16, by = 1), rho = 0.3,
                           alternative = "greater",
                           delta = 0.25, alpha = 0.05, beta = 0.05,
                           runs = 10000, output = FALSE)

print(sim.obj)

# Step 2: Determine the optimal nominal type-II-risk based on
#         the optimal size of subsamples (k) from step 1

sim.obj <- sim.seqtest.cor(rho.sim = 0.55, k = 16, rho = 0.3,
                           alternative = "greater",
                           delta = 0.25, alpha = 0.05, beta = seq(0.05, 0.15, by = 0.01),
                           runs = 10000, output = FALSE)

print(sim.obj)

Run the code above in your browser using DataLab