seqtest.cor: Sequential triangular test for Pearson's correlation...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/seqtest.cor.R

Description

This function performs the sequential triangular test for Pearson's correlation coefficient

Usage

1
2
seqtest.cor(x, k, rho, alternative = c("two.sided", "less", "greater"),
            delta, alpha = 0.05, beta = 0.1, output = TRUE, plot = FALSE)

Arguments

x

initial data, i.e., Pearson's correlation coefficient in a sub-sample of k observations.

k

number of observations in each sub-sample.

rho

a number indicating the correlation coefficient under the null hypothesis, ρ.0.

alternative

a character string specifying the alternative hypothesis,

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, an initial plot is generated.

Details

Null and alternative hypothesis is specified using arguments rho and delta. Note that the argument k (i.e., number of observations in each sub-sample) has to be specified. At least k = 4 is needed. The optimal value of k should be determined based on statistical simulation using sim.seqtest.cor function.

In order to specify a one-sided test, argument alternative has to be used (i.e., two-sided tests are conducted by default). That is, 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.

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 sequence of data pairs must we split into sub-samples of length k >= 4 each. 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., correlation coefficient)
spec specification of function arguments
tri specification of triangular
dat data
res list with results

Author(s)

Takuya Yanagida takuya.yanagida@univie.ac.at,

References

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

See Also

update.seqtest, sim.seqtest.cor, seqtest.mean, seqtest.prop, print.seqtest, plot.seqtest, descript

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#--------------------------------------
# H0: rho = 0.3, H1: rho != 0.3
# alpha = 0.05, beta = 0.2, delta = 0.2

seq.obj <- seqtest.cor(0.46, k = 14, rho = 0.3, delta = 0.2,
                       alpha = 0.05, beta = 0.2, plot = TRUE)

seq.obj <- update(seq.obj, c(0.56, 0.76, 0.56, 0.52))

#--------------------------------------
# H0: rho <= 0.3, H1: rho > 0.3
# alpha = 0.05, beta = 0.2, delta = 0.2

seq.obj <- seqtest.cor(0.46, k = 14, rho = 0.3,
                       alternative = "greater", delta = 0.2,
                       alpha = 0.05, beta = 0.2, plot = TRUE)

seq.obj <- update(seq.obj, c(0.56, 0.76, 0.66))

seqtest documentation built on May 2, 2019, 5:54 a.m.

Related to seqtest.cor in seqtest...