cen2means {NADA2} | R Documentation |
Censored data two-group test for difference in means
Description
Performs a parametric test of differences in means between two groups of censored data, either in original or in log units (the latter becomes a test for difference in geometric means).
Usage
cen2means(x1, x2, group, LOG = TRUE, printstat = TRUE)
Arguments
x1 |
The column of data values plus detection limits |
x2 |
The column of indicators, where 1 (or |
group |
Grouping or factor variable. Can be either a text or numeric value indicating the group assignment. |
LOG |
Indicator of whether to compute tests in the original units, or on their logarithms. The default is to use the logarithms (LOG = |
printstat |
Logical |
Details
Because this is an MLE procedure, when a normal distribution model is used (LOG=FALSE) values may be modeled as below zero. When this happens the means may be too low and the p-values may be unreal (often lower than they should be). Because of this, testing in log units is preferable and is the default.
Value
Q-Q Plot with Shapiro-Francia test for normality W and p-values.
Returns the Maximum Likelihood Estimation (MLE) test results including Chi-Squared value, degrees of freedom and p-value
of the test.
References
Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.
Shapiro, S.S., Francia, R.S., 1972. An approximate analysis of variance test for normality. Journal of the American Statistical Association 67, 215–216.
Examples
data(PbHeron)
cen2means(PbHeron$Liver,PbHeron$LiverCen,PbHeron$DosageGroup)