# NOT RUN {
# Importing from a CSV-file, using most of the defaults: variable
# separator colon, decimal separator period, no outlier-analyis,
# print to file.
# Note: You must adapt the path-variables. The example reads from
# the data provided by the library. Write-permissions must be granted
# for 'path.out' in order to save the result file. Here the default
# (R's temporary folder) is used. If you don't know where it is,
# type tempdir() in the console.
# }
# NOT RUN {
path.in <- paste0(find.package("replicateBE"), "/extdata/")
method.A(path.in = path.in, file = "DS", set = "01", ext = "csv")
# Should result in:
# CVwT : 35.16%
# swT : 0.34138
# CVwR : 46.96% (reference-scaling applicable)
# swR : 0.44645
# Expanded limits : 71.23% ... 140.40% [100exp(<U+00B1>0.760<U+00B7>swR)]
# swT / swR : 0.7647 (similar variabilities of T and R)
# sw-ratio (upper CL): 0.9324 (comparable variabilities of T and R)
# Confidence interval: 107.11% ... 124.89% pass
# Point estimate : 115.66% pass
# Mixed (CI & PE) : pass
#
# Internal reference dataset 01 used and results to R's
# temporary folder. Additional outlier-analyis.
method.A(ola = TRUE, data = rds01)
# Should give the same as above. Additionally:
# Outlier fence : 2<U+00D7>IQR of studentized residuals.
# Recalculation due to presence of 2 outliers (subj. 45|52)
# CVwR (outl. excl.) : 32.16% (reference-scaling applicable)
# swR (recalculated) : 0.31374
# Expanded limits : 78.79% ... 126.93% [100exp(<U+00B1>0.760<U+00B7>swR)]
# swT / swR (recalc.): 1.0881 (similar variabilities of T and R)
# sw-ratio (upper CL): 1.3282 (comparable variabilities of T and R)
# Confidence interval: pass
# Point estimate : pass
# Mixed (CI & PE) : pass
# Same dataset. Show information about outliers and the ANOVA-table.
method.A(ola = TRUE, print = FALSE, verbose = TRUE, data = rds01)
# }
# NOT RUN {
# Generate the data.frame of results (full precision) and show it
# in the console
x <- method.A(ola = TRUE, details = TRUE, print = FALSE, data = rds01)
print(x, row.names = FALSE)
#
# Assess the Type I Error and iteratively adjust alpha if necessary.
# Not run: due to timing policy of CRAN for examples
# }
# NOT RUN {
method.A(adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
# Assessment of the empiric Type I Error (TIE); 1,000,000 studies simulated.
# TIE not > nominal 0.05; consumer risk is controlled.
#
# Same with recalculation based on outliers, iteratively adjust alpha
# if necessary
# }
# NOT RUN {
method.A(ola = TRUE, adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
# Assessment of the empiric Type I Error (TIE) based on original CVwR;
# 1,000,000 studies simulated.
# TIE not > nominal 0.05; consumer risk is controlled.
# Assessment of the empiric Type I Error (TIE) based on recalculated CVwR;
# 1,000,000 studies in each of the 8 iterations simulated.
# TIE for alpha 0.050000 : 0.07018
# TIE for adjusted alpha 0.033416: 0.05000
#
# Repeat the evaluation with the adjusted alpha.
# }
# NOT RUN {
method.A(alpha = 0.033416, ola = TRUE, adjust = TRUE, data = rds01)
# }
# NOT RUN {
# Should give in the result file:
# alpha : 0.033416 (93.3168% CI)
# Confidence interval: 106.16% ... 126.00% pass
# Point estimate : 115.66% pass
# Mixed (CI & PE) : pass
# Assessment based on recalculated CVwR 32.16%
# Confidence interval: pass
# Point estimate : pass
# Mixed (CI & PE) : pass
# Assessment of the empiric Type I Error (TIE) based on original CVwR;
# 1,000,000 studies simulated.
# TIE not > nominal 0.05; consumer risk is controlled.
# Assessment of empiric Type I Error (TIE) based on recalculated CVwR;
# 1,000,000 studies in each of the 8 iterations simulated.
# TIE for alpha 0.033416 : 0.05000
# TIE not > nominal 0.05; consumer risk is controlled.
# }
Run the code above in your browser using DataLab