cond.test {isocir}R Documentation

Conditional Test for Contrasting Circular Order

Description

This function calculates the p-value corresponding to the conditional test where the hypotheses are whether the data follow a fixed circular order or not.

Usage

cond.test(data, groups=NULL, kappa=NULL, biasCorrect=TRUE)

Arguments

data

vector or matrix with the data. See details.

groups

a numeric vector with the circular order to be contrasted.

kappa

numeric and positive, if NULL, it will be estimated.

biasCorrect

logical, if TRUE, the correction of the bias is done in the estimation of kappa.

Details

This function performs the conditional test to constrast the hypotheses:

\hspace{1.7cm}H_{0}: The circular parameters follow a fixed circular order.

\hspace{1.7cm}H_{1}:\hspace{0.1cm}H_{0} is not true.

This conditional test is a modification of the likelihood ratio test. See Fern?ndez et al. (2011) for full details about the conditional test. For a whole explanation of the use of this function, see the vignette of this package where some examples are shown.

The circular order to be tested is defined in the argument groups by a numeric vector with the positions in the order of each element. The result of cond.test is the p-value of this test. There are two cases depending on whether \kappa is known or not.

If \kappa is known, data is usually a vector with the unrestricted circular means. In this case the value of \kappa has to be introduced in the argument kappa. data could also be a matrix with replications and the user knows the value of \kappa, then if it is introduced in the argument kappa it will be used by the function to perform the contrast instead of using the estimation.

When \kappa is unknown, replications are needed in order to calculate the estimation. Then, data must be a matrix where each column is a replication while each row is a population. \kappa is estimated internally using the function mle.vonmises developed in the package circular. By default, the correction of the bias is done, if the user prefers not correcting the bias, just set the argument biasCorrect=FALSE.

For both cases (\kappa known or unknown), the order to be contrasted is introduced in groups in the form of a numeric vector with length equal to the number of populations. Each value of the argument establishes the level of the order the corresponding population is assigned to. The default value is the sequence corresponding to the simple order (1, 2, ..., q). Notice that no particular order is assumed among the populations belonging to the same level set.

Value

The output is an S3 object of class isocir, similar to the result in the function CIRE but adding the following values:

pvalue

numeric, it is the p-value what results of the conditional test.

kappa

numeric, it is the value of kappa.

The attribute estkappa shows if kappa is estimated or known.

Author(s)

Author(s): Sandra Barragán based on the SAS code written by Miguel A. Fernández. Maintainer:<sandra.barragan@gmail.com>

References

Mardia, K. and Jupp, P. (2000). Directional Statistics, Chichester: Wiley.

Rueda, C., Fernandez, M. A. and Peddada, S. D. (2009). Estimation of parameters subject to order restrictions on a circle with application to estimation of phase angles of cell-cycle genes. Journal of the American Statistical Association, 104, n485; pp 338–347. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2742472/

Fernandez, M. A., Rueda, C. and Peddada, S. D. (2012). Identification of a core set of signature cell cycle genes whose relative order of time to peak expression is conserved across species, Nucl. Acids Res. 40, n7: pp 2823–2832. doi:10.1093/nar/gkr1077. https://academic.oup.com/nar/article/40/7/2823/1183140

See Also

CIRE,sce, mrl, isocir, plot.isocir.

Examples

data(cirdata)
# Example without replications and a partial circular order:
orderGroups <- c(1,1,1,2,2,3,4,4)
cond.test(cirdata, groups = orderGroups, kappa = 0.2)
# Example with replications and the next circular order:
orderGroups2 <- c(1:8)
data(datareplic)
cond.test(data = datareplic, groups = orderGroups2)

[Package isocir version 2.0-7.1 Index]