# 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)
set.seed(113)
Res.1 <- ss_aipe_smd_sensitivity(true_delta=.5, estimated_delta=.5, desired_width=.30,
assurance=NULL, conf_level=.95, G=50, print_iter=FALSE)
# Objects contained in the 'summary'.
Res.1$term
# 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,
assurance=NULL, conf_level=.95, G=50, print_iter=FALSE)
# The effect of the misspecification on mean confidence intervals is:
Res.2[1,]
# 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,
assurance=NULL, conf_level=.95, G=50, print_iter=FALSE)
# The effect of the misspecification on mean confidence intervals is:
Res.3[1,]
Run the code above in your browser using DataLab