Performs a permutation test of differences in means between groups of censored data.

`cenpermanova(y1, y2, grp, R = 9999, printstat = TRUE)`

- y1
The column of data values plus detection limits.

- y2
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`

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

- R
The number of permutations used. Default is 9999.

- printstat
Logical

`TRUE`

/`FALSE`

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

Permutation test results with the number of permutations, range in test statistics and `p-value`

values through the various permutations. Group means are also listed.

Because this is a permutation test it avoids the problem with MLE tests (see `cenanova`

) that assume a normal distribution. No values are modeled as below zero and group means and `p-values`

are trustworthy.

Good, P., 2000. Permutation Tests: A Practical Guide to Resampling Methods for Testing Hypotheses, 2nd ed, Springer Series in Statistics. Springer-Verlag, New York, NY. doi: 10.1007/978-1-4757-3235-1

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

```
data(PbHeron)
cenpermanova(PbHeron$Liver,PbHeron$LiverCen,PbHeron$DosageGroup)
#> Permutation test of mean CensData: PbHeron$Liver by Factor: PbHeron$DosageGroup
#> 9999 Permutations
#> Test Statistic = 1122 to 1122 p = 0.0012 to 0.0017
#>
#> mean(High) mean(Low)
#> 9.2880 0.1204
```