ss.aipe.smd.sensitivity {MBESS} | R Documentation |
Performs sensitivity analysis for sample size determination for the standardized mean difference given a population and an standardized mean difference. Allows one to determine the effect of being wrong when estimating the population standardized mean difference in terms of the width of the obtained (two-sided) confidence intervals.
ss.aipe.smd.sensitivity(true.delta = NULL, estimated.delta = NULL, desired.width = NULL, selected.n=NULL, assurance=NULL, certainty = NULL, conf.level = 0.95, G = 10000, print.iter = TRUE, ...)
true.delta |
population standardized mean difference |
estimated.delta |
estimated standardized mean difference; can be true.delta to perform standard simulations |
desired.width |
describe full width for the confidence interval around the population standardized mean difference |
selected.n |
selected sample size to use in order to determine distributional properties of at a given value of sample size |
assurance |
parameter to ensure confidence interval width with a specified degree of certainty (must
be NULL or between zero and unity) |
certainty |
an alias for assurance |
conf.level |
the desired degree of confidence (i.e., 1-Type I error rate). |
G |
number of generations (i.e., replications) of the simulation |
print.iter |
to print the current value of the iterations |
... |
for modifying parameters of functions this function calls |
For sensitivity analysis when planning sample size given the desire to obtain narrow confidence intervals
for the population standardized mean difference. Given a population value and an estimated value, one can determine
the effects of incorrectly specifying the population standardized mean difference (true.delta
) on the
obtained widths of the confidence intervals. Also, one can evaluate the percent of the confidence intervals
that are less than the desired width (especially when modifying the certainty
parameter); see ss.aipe.smd
)
Alternatively, one can specify selected.n
to determine the results at a particular sample size (when doing this estimated.delta
cannot be specified).
Results |
list of the results in G -length vector form |
Specifications |
specification of the function |
Summary |
summary measures of some important descriptive statistics |
d |
contained in Results list: vector of the observed d values |
Full.Width |
contained in Results list: vector of |
Width.from.d.Upper |
contained in Results list: vector of the observed upper widths of the confidence interval (upper limit minus observed standardized mean difference) |
Width.from.d.Lower |
contained in Results list: vector of the observed lower widths of the confidence interval (standardized mean difference minus lower limit) |
Type.I.Error.Upper |
contained in Results list: iterations where a Type I error occurred on the upper end of the confidence interval |
Type.I.Error.Lower |
contained in Results list: iterations where a Type I error occurred on the lower end of the confidence interval |
Type.I.Error |
contained in Results list: iterations where a Type I error occurred |
Upper.Limit |
contained in Results list: vector of the obtained upper limits from the simulation |
Low.Limit |
contained in Results list: vector of the obtained lower limits from the simulation |
replications |
contained in Specifications list: number of generations (i.e., replication) of the simulation |
true.delta |
contained in Specifications list: population value of the standardized mean difference |
estimated.delta |
contained in Specifications list: value of the population (mis)specified for purposes of sample size planning |
desired.width |
contained in Specifications list: desired full width of the confidence interval around the population standardized mean difference |
certainty |
contained in Specifications list: desired degree of certainty that the obtained confidence interval width is less than the value specified |
n.j |
contained in Specifications list: sample size per group given the specifications |
mean.full.width |
contained in Summary list: mean width of the obtained confidence intervals |
median.full.width |
contained in Summary list: median width of the obtained confidence intervals |
sd.full.width |
contained in Summary list: standard deviation of the obtained confidence intervals |
Pct.Less.Desired |
contained in Summary list: Percent of the confidence widths less than the width specified. |
mean.Width.from.d.Lower |
contained in Summary list:mean width of the lower portion of the confidence interval (from d) |
mean.Width.from.d.Upper |
contained in Summary list:mean width of the upper portion of the confidence interval (from d) |
Type.I.Error.Upper |
contained in Summary list: Type I error rate from upper side |
Type.I.Error.Lower |
contained in Summary list: Type I error rate from the lower side |
Returns three lists, where each list has multiple components.
Ken Kelley (University of Notre Dame; KKelley@ND.Edu)
Cumming, G. & Finch, S. (2001) A primer on the understanding, use, and calculation of confidence intervals that are based on central and noncentral distributions, Educational and Psychological Measurement, 61, 532–574.
Hedges, L. V. (1981). Distribution theory for Glass's Estimator of effect size and related estimators. Journal of Educational Statistics, 2, 107–128.
Kelley, K. (2005) The effects of nonnormal distributions on confidence intervals around the standardized mean difference: Bootstrap and parametric confidence intervals, Educational and Psychological Measurement, 65, 51–69.
Steiger, J. H., & Fouladi, R. T. (1997) Noncentrality interval estimation and the evaluation of statistical methods. In L. L. Harlow, S. A. Mulaik,&J.H. Steiger (Eds.), What if there where no significance tests? (pp. 221-257). Mahwah, NJ: Lawrence Erlbaum.
ss.aipe.smd
# Since 'true.delta' equals 'estimated.delta', this usage # returns the results of a correctly specified situation. # Note that 'G' should be large (50 is used to make the example run easily) # Res.1 <- ss.aipe.smd.sensitivity(true.delta=.5, estimated.delta=.5, # desired.width=.30, certainty=NULL, conf.level=.95, G=50, # print.iter=FALSE) # Lists contained in Res.1. # names(Res.1) #Objects contained in the 'Results' lists. # names(Res.1$Results) #Extract d from the Results list of Res.1. # d <- Res.1$Results$d # hist(d) # Pull out summary measures # Res.1$Summary # True standardized mean difference is .4, but specified at .5. # Change 'G' to some large number (e.g., G=5,000) # Res.2 <- ss.aipe.smd.sensitivity(true.delta=.4, estimated.delta=.5, # desired.width=.30, certainty=NULL, conf.level=.95, G=50, # print.iter=FALSE) # The effect of the misspecification on mean confidence intervals is: # Res.2$Summary$mean.full.width # True standardized mean difference is .5, but specified at .4. # Res.3 <- ss.aipe.smd.sensitivity(true.delta=.5, estimated.delta=.4, # desired.width=.30, certainty=NULL, conf.level=.95, G=50, # print.iter=FALSE) # The effect of the misspecification on mean confidence intervals is: # Res.3$Summary$mean.full.width