cen1way: Peto-Peto one-factor test

View source: R/cen1way.R

cen1wayR Documentation

Peto-Peto one-factor test

Description

Performs a Peto-Peto nonparametric test of differences in cdfs between groups. If more than two groups, the test is followed by a nonparametric multiple comparison test. Uses the BH method of adjusting p-values.

Usage

cen1way(x1, x2, group, mcomp.method = "BH", printstat = TRUE)

Arguments

x1

The column of data values plus detection limits

x2

The column of indicators, where 1 (or TRUE) indicates a detection limit in the y1 column, and 0 (or FALSE) indicates a detected value in y1.

group

Grouping or factor variable. Can be either a text or numeric value indicating the group assignment.

mcomp.method

One of the standard methods for adjusting p-values for multiple comparisons. Type ?p.adjust for the list of possible methods. Default is Benjamini-Hochberg "BH" false discover rate.

printstat

Logical TRUE/FALSE option of whether to print the resulting statistics in the console window, or not. Default is TRUE.

Value

A list of summary statistics for each group evaluated containing the following components:

  • N Number of samples

  • PctND Percentage of non-detects

  • KMmean Kaplan-Meier estimate of the mean

  • KMsd Kaplan-Meier estimate of standard deviation

  • KMmedian Kaplan-Meier estmate of the median

Peto-Peto test results including Chi-Squared value, degrees of freedom and p-value of the test.

If more than two groups, p-values of the pairwise multiple comparisons, adjusted using the BH false-discovery rate, are reported.

References

Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

Peto, R., Peto, J., 1972. Asymptotically Efficient Rank Invariant Test Procedures. Journal of the Royal Statistical Society. Series A (General) 135, 185. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.2307/2344317")}

Benjamini, Y., Hochberg, Y., 1995. Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society. Series B (Methodological), 57, 289-300.

Examples

data(PbHeron)

# Two Groups
cen1way(PbHeron$Liver,PbHeron$LiverCen,PbHeron$DosageGroup)

# More than two groups
cen1way(PbHeron$Liver,PbHeron$LiverCen,PbHeron$Group)

NADA2 documentation built on Oct. 20, 2023, 5:07 p.m.