npower.lnorm {STAND} | R Documentation |
Sample Size and Power For Lognormal Distribution
Description
Find either the sample size or power for complete sample from lognormal distribution
Usage
npower.lnorm(n=NA,power=NA,fstar=1,p=0.95,gamma=0.95)
Arguments
n |
sample size |
power |
power of the test = 1 - |
fstar |
true percent of X's |
p |
probability for Xp the 100pth percentile. Default is 0.95 |
gamma |
one-sided confidence level |
Details
Find either the sample size n
or the power
of the test for specified
values of fstar
, p
, and gamma
. Either n
is missing
or power
is missing.
The null hypothesis of interest is
Ho: F \ge Fo = 1-p
; i.e., Fo is the maximum proportion of the
population that can exceed the limit Lp. The null hypothesis is
rejected if the 100 \gamma\%
UCL for F is less than Fo ,
indicating that the exposure profile is acceptable. For the complete
data case this is equivalent to testing the null hypothesis
Ho: Xp \ge Lp
at the \alpha = (1- \gamma )
significance level.
See efraction.exact
, percentile.exact
and
Section 2.3 of Frome and Wambach(2005) for further details.
Value
A vector with components:
n |
sample size |
power |
power of the test = 1 - |
fstar |
true percent of X's |
p |
probability for Xp the 100pth percentile. Default is 0.95 |
gamma |
one-sided confidence level |
Note
The R function uniroot
is used to find a parameter of the
non-central t distribution. In some versions of R this
may cause a warning message. See R bug report RP 9171 full precision
was not achieved in 'pnt'. This warning message may occur in uniroot
calls to pt
and does not effect the precision of the final result
Author(s)
E.L. Frome
References
Johnson, N. L. and B. L. Welch (1940), "Application of the Non-Central t-Distribution," Biometrika, 31(3/4), 362-389.
Lyles R. H. and L. L. Kupper (1996), "On strategies for comparing occupational exposure data to limits," American Industrial Hygiene Association Journal, 57:6-15.
Frome, E. L. and Wambach, P. F. (2005), "Statistical Methods and Software for the Analysis of Occupational Exposure Data with Non-Detectable Values," ORNL/TM-2005/52,Oak Ridge National Laboratory, Oak Ridge, TN 37830. Available at: http://www.csm.ornl.gov/esh/aoed/ORNLTM2005-52.pdf
Ignacio, J. S. and W. H. Bullock (2006), A Strategy for Assesing and Managing Occupational Exposures, Third Edition, AIHA Press, Fairfax, VA.
Mulhausen, J. R. and J. Damiano (1998), A Strategy for Assessing and Managing Occupational Exposures, Second Edition, AIHA Press, Fairfax, VA.
See Also
Help files for efraction.ml
,percentile.ml
,
efclnp
,aihand
Examples
# EXAMPLE 1
# Table VII.1 Mulhausen and Damiano (1998) adapted from
# Table II in Lyles and Kupper (1996) JAIHA vol 57 6-15 Table II
# Sample Size Needed When Using UTL(95,95) to Show 95% Confidence
# that the 95th Percentile is below the OEL (Power = 0.8)
rx<-c(1.5,2,2.5,3)
sdx<- sqrt(c(0.5,1,1.5,2,2.5,3))
tabn<-matrix(0,4,6)
for ( i in 1:4) {
for (j in 1:6) {
fstar<- 100*(1 -pnorm( log(rx[i])/sdx[j] + qnorm(0.95) ))
tabn[i,j]<- npower.lnorm(NA,0.8,fstar,p=0.95,gamma=0.95)[1]
}
}
cn<- paste("GSD = ",round(exp(sdx),2),sep="" )
dimnames(tabn)<-list( round(1/rx,2),cn)
rm(cn,rx,sdx)
tabn
# EXAMPLE 2
top<-"Power For Sample Size n = 20 for p=0.95 gamma=0.95"
fstar <- seq(0.2,4.8,0.1)
pow <- rep(1,length(fstar))
for (i in 1 : length(fstar)) {
pow[i]<-npower.lnorm(20,NA,fstar[i],p=0.95,gamma=0.95)[2]
}
plot(fstar,pow,xlim=c(0,5),ylim=c(0,1),main=top,
xlab="fstar = True Percent of Xs > L(Specified Limit )",ylab="Power")