# seqtest.prop: Sequential triangular test for the proportion In seqtest: Sequential Triangular Test

## Description

This function performs the sequential triangular test for the proportion in one- or two-samples

## Usage

 1 2 seqtest.prop(x, y = NULL, pi = NULL, alternative = c("two.sided", "less", "greater"), delta, alpha = 0.05, beta = 0.1, output = TRUE, plot = FALSE)

## Arguments

 x initial data for group x, at least one entry. y initial data for group y, at least one entry for a two-sample test. pi a number indicating the true value of the probability of success in group x, π.0. alternative a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "less" or "greater". delta minimum difference to be detected, δ. alpha type-I-risk, α. beta type-II-risk, β. output logical: if TRUE, output is shown. plot logical: if TRUE, a plot is generated.

## Details

For the one-sample test, arguments x, pi, and delta has to be specified (i.e., argument y must not be specified). For the two-sample test, arguments x, y, pi, and delta has to be specified

In order to specify a one-sided test, argument alternative has to be used (i.e., two-sided tests are conducted by default). For the one-sample test, alternative = "less" specifies the null hypothesis, H0: π >= π.0 and the alternative hypothesis, H1: π < π.0; alternative = "greater" specifies the null hypothesis, H0: π <= π.0 and the alternative hypothesis, H1: π > π.0. For the two-sample test alternative = "less" specifies the null hypothesis, H0: π.1 >= π.2 and the alternative hypothesis, H1: π.1 < π.2; alternative = "greater" specifies the null hypothesis, H0: π.1 <= π.2 and the alternative hypothesis, H1: π.1 > π.2.

The main characteristic of the sequential triangular test is that there is no fixed sample size given in advance. That is, for the most recent sampling point, one has to decide whether sampling has to be continued or either the null- or the alternative hypothesis can be accepted given specified precision requirements (i.e. type-I-risk, type-II-risk and an effect size). The (cumulative) test statistic Z.m on a Cartesian coordinate system produces a "sequential path" on a continuation area as a triangle. As long as the statistic remains within that triangle, additional data have to be sampled. If the path touches or exceeds the borderlines of the triangle, sampling is completed. Depending on the particular borderline, the null-hypothesis is either accepted or rejected.

## Value

Returns an object of class seqtest, to be used for later update steps. The object has following entries:

 call function call type type of the test (i.e., proportion) spec specification of function arguments tri specification of the triangular dat data res list with results

## Author(s)

Takuya Yanagida [email protected],

## References

Rasch, D., Pilz, J., Verdooren, L. R., & Gebhardt, G. (2011). Optimal experimental design with R. Boca Raton: Chapman & Hall/CRC.

Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.