Uses ROS model output, computes the Zhou and Gao 1997 modified Cox’s method two-sided confidence interval around the mean for a lognormal distribution. Computes a t-interval for a gaussian ROS model output.

ROSci(cenros.out, conf = 0.95, printstat = TRUE)

Arguments

cenros.out

an ROS model output object (see details)

conf

Confidence coefficient of the interval (Default is 0.95)

printstat

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

Value

Prints a lower (LCL) and upper (UCL) confidence interval based on the conf provided (Default is 95%)

Details

This function uses an ROS model output based on the ros function, prevuously in the NADA package, now in this package. The lognormal distribution is the default for the NADA package but a gaussian distribution is optional here.

For implementation of ROSci(...) see the examples below.

References

Helsel, D.R., 2011. Statistics for censored environmental data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

Lee, L., Helsel, D., 2005. Statistical analysis of water-quality data containing multiple detection limits: S-language software for regression on order statistics. Computers & Geosciences 31, 1241–1248. doi: 10.1016/j.cageo.2005.03.012

Zhou, X.-H., Gao, S., 1997. Confidence Intervals for the Log-Normal Mean. Statistics in Medicine 16, 783–790. doi: 10.1002/(SICI)1097-0258(19970415)16:7<783::AID-SIM488>3.0.CO;2-2

Examples

data(Brumbaugh)
myros <- ros(Brumbaugh$Hg,Brumbaugh$HgCen)

summary(myros)
#> 
#> Call:
#> lm(formula = obs.transformed ~ pp.nq, na.action = na.action)
#> 
#> Residuals:
#>      Min       1Q   Median       3Q      Max 
#> -0.23282 -0.05691 -0.01930  0.03697  0.59211 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) -1.54719    0.01031 -150.11   <2e-16 ***
#> pp.nq        0.99735    0.01213   82.21   <2e-16 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.1088 on 116 degrees of freedom
#> Multiple R-squared:  0.9831,	Adjusted R-squared:  0.983 
#> F-statistic:  6759 on 1 and 116 DF,  p-value: < 2.2e-16
#> 

# ROS Mean
mean(myros$modeled)
#> [1] 0.3555983

# 95% CI around the ROS mean
ROSci(myros)
#> Assuming a lognormal distribution 
#>   LCL UCL
#> 1  NA  NA