Title: | Nonparametric Bootstrap Test with Pooled Resampling |
Version: | 0.3.2 |
Description: | Addressing crucial research questions often necessitates a small sample size due to factors such as distinctive target populations, rarity of the event under study, time and cost constraints, ethical concerns, or group-level unit of analysis. Many readily available analytic methods, however, do not accommodate small sample sizes, and the choice of the best method can be unclear. The 'npboottprm' package enables the execution of nonparametric bootstrap tests with pooled resampling to help fill this gap. Grounded in the statistical methods for small sample size studies detailed in Dwivedi, Mallawaarachchi, and Alvarado (2017) <doi:10.1002/sim.7263>, the package facilitates a range of statistical tests, encompassing independent t-tests, paired t-tests, and one-way Analysis of Variance (ANOVA) F-tests. The nonparboot() function undertakes essential computations, yielding detailed outputs which include test statistics, effect sizes, confidence intervals, and bootstrap distributions. Further, 'npboottprm' incorporates an interactive 'shiny' web application, nonparboot_app(), offering intuitive, user-friendly data exploration. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
URL: | https://github.com/mightymetrika/npboottprm |
BugReports: | https://github.com/mightymetrika/npboottprm/issues |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Depends: | R (≥ 2.10) |
LazyData: | true |
Imports: | DT, fGarch, ggplot2, lmPerm, MASS, MKinfer, mmints, shiny, shinythemes, sn |
NeedsCompilation: | no |
Packaged: | 2024-09-13 15:49:00 UTC; Administrator |
Author: | Mackson Ncube [aut, cre], mightymetrika, LLC [cph, fnd] |
Maintainer: | Mackson Ncube <macksonncube.stats@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-09-13 16:10:02 UTC |
Append Input Parameters to Data Frame
Description
This internal function appends the input parameters and a unique run code to the data frame of simulation results. It creates a comprehensive data frame that includes both the results and the parameters used for the simulation, facilitating easier tracking and analysis of the simulation runs.
Usage
appendInputParams(df, input)
Arguments
df |
A data frame containing the simulation results. |
input |
A list of input parameters used in the simulation, typically sourced from the Shiny app's user inputs. |
Value
A data frame that combines the original simulation results with the input parameters used in the simulation. Additionally, a unique run code is generated and appended to each row for identification purposes.
Internal Bootstrap Sampling Function for F-tests
Description
This is an internal function used by nonparboot() to perform bootstrap resampling for F-tests. It is not intended to be called directly by the user.
Usage
bootstrap_f_sample(x_val, y_val, grp_val, grp_sizes, pre_calc)
Arguments
x_val |
A numeric vector of values from the primary variable. |
y_val |
A numeric vector of values from the second variable. This parameter is not used in this function but is included for consistency with other bootstrap sampling functions. |
grp_val |
A factor vector of group labels. |
grp_sizes |
A table of group sizes. |
pre_calc |
A list containing pre-calculated statistics from the original data. |
Value
A numeric vector of length 2 containing the bootstrapped test statistic and the effect size.
Internal Bootstrap Sampling Function for Paired T-tests
Description
This is an internal function used by nonparboot() to perform bootstrap resampling for paired t-tests.
Usage
bootstrap_pt_sample(x_val, y_val, grp_val, grp_sizes, pre_calc)
Arguments
x_val |
A numeric vector of values from the primary variable. |
y_val |
A numeric vector of values from the second variable. |
grp_val |
A factor vector of group labels. This parameter is not used in this function but is included for consistency with other bootstrap sampling functions. |
grp_sizes |
A table of group sizes. This parameter is not used in this function but is included for consistency with other bootstrap sampling functions. |
pre_calc |
A list containing pre-calculated statistics from the original data. |
Value
A numeric vector of length 2 containing the bootstrapped test statistic and mean difference.
Internal Bootstrap Sampling Function for T-tests
Description
This is an internal function used by nonparboot() to perform bootstrap resampling for independent t-tests.
Usage
bootstrap_t_sample(x_val, y_val, grp_val, grp_sizes, pre_calc)
Arguments
x_val |
A numeric vector of values from the primary variable. |
y_val |
A numeric vector of values from the second variable (only used for paired t-tests). |
grp_val |
A factor vector of group labels (only used for independent t-tests and F-test). |
grp_sizes |
A table of group sizes (only used for independent t-tests and F-test). |
pre_calc |
A list containing pre-calculated statistics from the original data. |
Value
A numeric vector of length 2 containing the bootstrapped test statistic and mean difference.
Simulated Data for F-test
Description
A simulated data set to experiment with nonparboot() with test = "F"
Usage
data_f
Format
data_f
A data frame with 15 rows and 2 columns:
- x
A numeric variable
- grp
A factor variable with group labels
Source
Simulated data
Simulated Data for F-test Using Identically Distributed Data
Description
A simulated data set to experiment with nonparboot() with test = "F" when all groups are drawn from identical distributions
Usage
data_f_id
Format
data_f_id
A data frame with 15 rows and 2 columns:
- x
A numeric variable
- grp
A factor variable with group labels
Source
Simulated data
Simulated Data for F-test with Missing Outcomes
Description
A simulated data set to experiment with nonparboot() with test = "F" and missing outcomes
Usage
data_f_mi
Format
data_f_mi
A data frame with 15 rows and 2 columns:
- x
A numeric variable
- grp
A factor variable with group labels
Source
Simulated data
Simulated Data for Paired T-test
Description
A simulated data set to experiment with nonparboot() with test = "pt"
Usage
data_pt
Format
data_pt
A data frame with 10 rows and 2 columns:
- x
A numeric variable
- y
A numeric variable
Source
Simulated data
Simulated Data for Paired T-test Using Identically Distributed Data
Description
A simulated data set to experiment with nonparboot() with test = "pt" when both variables are drawn from identical distributions
Usage
data_pt_id
Format
data_pt_id
A data frame with 10 rows and 2 columns:
- x
A numeric variable
- y
A numeric variable
Source
Simulated data
Simulated Data for Paired T-test with Missing Data
Description
A simulated data set to experiment with nonparboot() with test = "pt" and missing values
Usage
data_pt_mi
Format
data_pt_mi
A data frame with 10 rows and 2 columns:
- x
A numeric variable
- y
A numeric variable
Source
Simulated data
Simulated Data for Independent T-test
Description
A simulated data set to experiment with nonparboot() with test = "t"
Usage
data_t
Format
data_t
A data frame with 10 rows and 2 columns:
- x
A numeric variable
- grp
A factor variable with group labels
Source
Simulated data
Simulated Data for Independent T-test with Missing Outcomes
Description
A simulated data set to experiment with nonparboot() with test = "t" and missing outcome values
Usage
data_t_mi
Format
data_t_mi
A data frame with 10 rows and 2 columns:
- x
A numeric variable
- grp
A factor variable with group labels
Source
Simulated data
Generate a List of Available Cell Blocks
Description
This function creates and returns a named list of cell blocks, where each name corresponds to a descriptive label of the cell block, and the value is the function name associated with that cell block.
Usage
getCellBlocks()
Value
A named list where each name is a string describing a cell block (e.g., "T2 Cell Block 1.1") and each value is a string corresponding to the function name (e.g., "replext_t2_c1.1") that is associated with the simulation process for that particular cell block.
Generate UI Elements for Selected Cell Block
Description
This function generates a dynamic user interface (UI) for the Shiny app based on the selected cell block. It creates a list of Shiny UI elements, such as numeric inputs and text inputs, tailored to the requirements of the chosen cell block.
Usage
getUIParams(cellBlock)
Arguments
cellBlock |
A character string identifying the selected cell block. The function uses this parameter to determine which set of UI elements to generate. |
Value
A list of Shiny UI elements specific to the selected cell block. These UI elements include numeric inputs, text inputs, and other relevant controls required to capture user inputs for simulation parameters.
Nonparametric Bootstrap Test with Pooled Resampling for Small Sample Sizes
Description
This function performs a nonparametric bootstrap test with pooled resampling for small sample sizes, as described in Dwivedi et al. (2017). It supports t-tests (independent and paired) and F-tests (one-way ANOVA), with a user-specified number of bootstrap resamples.
Usage
nonparboot(
data,
x,
y = NULL,
grp = NULL,
nboot,
test = c("t", "pt", "F"),
conf.level = 0.95,
seed = NULL,
na_rm = FALSE
)
Arguments
data |
A data frame containing the variables to be analyzed. |
x |
A character string specifying the column in 'data' to be used as the primary variable. |
y |
An optional character string specifying the column in 'data' to be used as the second variable for paired t-tests. Default is NULL. |
grp |
An optional character string specifying the column in 'data' to be used as the grouping variable for independent t-tests and F-tests. Default is NULL. |
nboot |
An integer specifying the number of bootstrap resamples to perform. |
test |
A character string specifying the type of test to perform. Must be one of "t", "pt", or "F" for independent t-test, paired t-test, or F-test, respectively. Default is "t". |
conf.level |
A numeric value between 0 and 1 specifying the confidence level for confidence intervals. Default is 0.95. |
seed |
An optional value interpreted as an integer to set the seed for the random number generator, for reproducibility. Default is NULL (no seed). |
na_rm |
Remove observations with missing values. Default is FALSE. |
Value
A list with the following components:
-
p.value
: The p-value of the test. -
orig.stat
: The test statistic calculated from the original data. -
ci.stat
: The confidence interval for the test statistic from the bootstrap distribution. -
bootstrap.stat.dist
: The distribution of the test statistic values from the bootstrap resamples. -
effect.size
: The effect size (mean difference or eta-squared) calculated from the original data. -
ci.effect.size
: The confidence interval for the effect size from the bootstrap distribution. -
bootstrap.effect.dist
: The distribution of effect size values from the bootstrap resamples.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA (2017). "Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method." Statistics in Medicine, 36 (14), 2187-2205. https://doi.org/10.1002/sim.7263
Examples
# Example usage of nonparboot
np_res <- nonparboot(iris, x = "Sepal.Length", grp = "Species", nboot = 1000, test = "F")
print(np_res$p.value)
Shiny App for Nonparametric Bootstrap Tests with Pooled Resampling
Description
This function creates a Shiny app for performing nonparametric bootstrap tests with pooled resampling. The app allows you to conduct an independent t-test, a paired t-test, or a one-way ANOVA, depending on your input.
Usage
nonparboot_app()
Value
An interactive Shiny app.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA (2017). 'Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method.' Statistics in Medicine, 36 (14), 2187-2205. https://doi.org/10.1002/sim.7263
Examples
if(interactive()){
nonparboot_app()
}
Remove NA values from vectors
Description
This function removes NA values from a list of vectors. If na_rm is TRUE, it removes all NA values from the input vectors. Otherwise, it returns the input vectors unchanged.
Usage
remove_na(na_rm, ...)
Arguments
na_rm |
A logical value indicating whether to remove NA values. |
... |
One or more vectors from which to remove NA values. |
Value
A list of vectors with NA values removed (if na_rm
is TRUE
),
or the input vectors unchanged (if na_rm
is FALSE
).
Replext Simulation Shiny App
Description
This application attempts to replicate and extend the simulation results from the paper by Dwivedi et al. (2017). The application includes a user interface for selecting simulation parameters and a server logic to process the simulation and handle user interactions.
Usage
replext()
Details
The app's user interface consists of:
A dropdown menu to select a cell block for the simulation, which is populated using the
getCellBlocks
function.Dynamic UI elements for inputting simulation parameters, generated based on the selected cell block.
A button to run the simulation.
A download button to export the simulation results.
The server logic of the app handles:
Rendering the dynamic UI elements for simulation parameters.
Observing the simulation run event and processing the simulation using the
runSimulation
function.Rendering a table to display the simulation results.
Handling the data download request and exporting the results as a CSV file.
Value
A Shiny app object which can be run to start the application.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
if(interactive()){
replext()
}
Replext Simulation Shiny App with Database Integration
Description
This application replicates and extends the simulation results from the paper by Dwivedi et al. (2017), now with added functionality to interact with a PostgreSQL database. The app includes a user interface for selecting simulation parameters and a server logic to process the simulation and handle user interactions, including saving and retrieving data from a database.
Usage
replext_pgsql(dbname, datatable, host, port, user, password)
Arguments
dbname |
The name of the PostgreSQL database to connect to. |
datatable |
The name of the table in the database where the simulation results will be stored and retrieved. |
host |
The host address of the PostgreSQL database. |
port |
The port number for the PostgreSQL database connection. |
user |
The username for accessing the PostgreSQL database. |
password |
The password for the specified user to access the PostgreSQL database. |
Details
The app's user interface consists of:
A dropdown menu to select a cell block for the simulation, which is populated using the
getCellBlocks
function.Dynamic UI elements for inputting simulation parameters, generated based on the selected cell block.
Buttons to run the simulation and submit the results to a PostgreSQL database.
A table to display the simulation results and previously saved responses.
A download button to export all responses as a CSV file.
The server logic of the app handles:
Rendering the dynamic UI elements for simulation parameters.
Observing the simulation run event and processing the simulation using the
runSimulation
function.Rendering a table to display the simulation results.
Handling the submission of results and storing them in a PostgreSQL database.
Loading existing responses from the database.
Downloading responses as a CSV file.
Value
A Shiny app object which can be run to start the application.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
if (interactive()) {
replext_pgsql(
dbname = "your_db_name",
datatable = "your_data_table",
host = "localhost",
port = 5432,
user = "your_username",
password = "your_password"
)
}
Replicate and Extend Simulation Results from Table 2 Cell 1.1
Description
This function attempts to replicate and extend the simulation results from Table 2 cell block 1.1 of the paper by Dwivedi et al. (2017). The default parameter values aim to replicate the results from the paper, while modifying the parameter values allows for an extension of the results.
Usage
replext_t2_c1.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t2_c1.1(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 1.2
Description
This function is a wrapper around replext_t2_c1.1
and is specifically used
for replicating and extending the simulation results from Table 2 cell block 1.2
of the paper by Dwivedi et al. (2017). It sets the standard deviation of the
second group (S2
) to 3 by default.
Usage
replext_t2_c1.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c1.2(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 2.1
Description
This function is intended to replicate and extend the simulation results
from Table 2 cell block 2.1 in the paper by Dwivedi et al. (2017). It is designed
for scenarios with the same skewed distribution and equal variance in
both groups. The function acts as a wrapper around replext_t2_c1.1
, applying
specific skewness parameters as required for the cell.
Usage
replext_t2_c2.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c2.1(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 2.2
Description
This function is designed to replicate and extend the simulation results
from Table 2 cell block 2.2 of the paper by Dwivedi et al. (2017). It handles
scenarios with same skewed distribution but with different variances in
the two groups. The function is a wrapper around replext_t2_c1.1
, setting
specific skewness and variance parameters as per the cell's requirements.
Usage
replext_t2_c2.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c2.2(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 3.1
Description
This function is designed to replicate and extend the simulation results
from Table 2 cell block 3.1 of the paper by Dwivedi et al. (2017). It handles
scenarios with different skewed distributions but equal variance in the
two groups. The function is a wrapper around replext_t2_c1.1
, setting
specific skewness parameters as per the cell's requirements.
Usage
replext_t2_c3.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0.8,
Sk2 = 1,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 1.0. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c3.1(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 3.2
Description
This function aims to replicate and extend the simulation results from Table 2
cell block 3.2 in the paper by Dwivedi et al. (2017). It is tailored for scenarios
with different skewed distributions and unequal variance between the two groups.
The function serves as a wrapper around replext_t2_c1.1
, utilizing specific
skewness parameters and variances as described in the cell.
Usage
replext_t2_c3.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0.8,
Sk2 = 1,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 1.0. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c3.2(n1 = c(4), n2 = c(4), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 4.1
Description
This function is designed to replicate and extend the simulation results
from Table 2 cell block 4.1 of the paper by Dwivedi et al. (2017). It addresses
scenarios with unequal sample sizes but the same skewed distribution and equal
variance in both groups. The function acts as a wrapper around replext_t2_c1.1
,
setting specific skewness parameters and sample sizes as per the cell's requirements.
Usage
replext_t2_c4.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(4, 3, 5, 4, 6, 4, 3, 4, 5, 6),
n2 = c(2, 4, 3, 5, 3, 6, 7, 11, 10, 9),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, designed for unequal sample sizes. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c4.1(n1 = c(4), n2 = c(2), n_simulations = 1)
Replicate and Extend Simulation Results from Table 2 Cell 4.2
Description
This function is designed to replicate and extend the simulation results
from Table 2 cell block 4.2 in the paper by Dwivedi et al. (2017). It is tailored
for scenarios with unequal sample sizes, same skewed distribution, but
different variances between the two groups. The function acts as a wrapper
around replext_t2_c1.1
, setting specific skewness parameters, variances,
and sample sizes as described in the cell.
Usage
replext_t2_c4.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(4, 3, 5, 4, 6, 4, 3, 4, 5, 6),
n2 = c(2, 4, 3, 5, 3, 6, 7, 11, 10, 9),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, designed for unequal sample sizes. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t2_c4.2(n1 = c(4), n2 = c(2), n_simulations = 1)
Replicate and Extend Simulation Results for Statistical Power from Table 3 Cell 1.1
Description
This function is tailored to replicate and extend the simulation results for assessing
statistical power from Table 3 cell block 1.1 in the paper by Dwivedi et al. (2017).
It compares two groups with different means but equal variance and optional skewness.
The function is a wrapper around replext_t2_c1.1
, adapted for statistical power analysis.
Usage
replext_t3_c1.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), representing statistical power.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c1.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 1.2
Description
This function is designed to replicate and extend the statistical power analysis
from Table 3 cell block 1.2 in the paper by Dwivedi et al. It focuses on
scenarios with normal distribution having different means and unequal variances
across two groups. It utilizes replext_t2_c1.1
for its calculations by setting
specific means and standard deviations.
Usage
replext_t3_c1.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), representing the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c1.2(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 2.1
Description
This function is geared towards replicating and extending the statistical power analysis
from Table 3 cell block 2.1 of the paper by Dwivedi et al. (2017). It deals with
scenarios involving skewed distributions with equal variance and different means
in the two groups. It acts as a wrapper around replext_t2_c1.1
, with specific
adjustments for skewness parameters and means.
Usage
replext_t3_c2.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), reflecting the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c2.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 2.2
Description
This function aims to replicate and extend the statistical power analysis
from Table 3 cell block 2.2 in the paper by Dwivedi et al. (2017). It deals with
scenarios involving skewed distributions with different variances and means
in the two groups. It is a wrapper around replext_t2_c1.1
, with adjusted means,
variances, and skewness parameters.
Usage
replext_t3_c2.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), representing the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c2.2(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 3.1
Description
This function is aimed at replicating and extending the statistical power analysis
from Table 3 cell block 3.1 in the paper by Dwivedi et al. (2017). It addresses
scenarios with different skewed distributions but equal variance and different
means in the two groups. It utilizes replext_t2_c1.1
for calculations by
setting specific skewness parameters.
Usage
replext_t3_c3.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0.8,
Sk2 = 1,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 1.0. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), indicating the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c3.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 3.2
Description
This function aims to replicate and extend the statistical power analysis
from Table 3 cell block 3.2 in the paper by Dwivedi et al. (2017). It is designed
for scenarios involving different skewed distributions with different variances
and different means in the two groups. The function is a wrapper around
replext_t2_c1.1
, applying specific skewness parameters, means, and variances.
Usage
replext_t3_c3.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0.8,
Sk2 = 1,
n1 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 1.0. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), indicating the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c3.2(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 4.1
Description
This function is crafted to replicate and extend the statistical power analysis
from Table 3 cell block 4.1 in the paper by Dwivedi et al. (2017). It focuses on
scenarios with unequal sample sizes, same skewed distribution, and equal variance
between the two groups. It utilizes replext_t2_c1.1
with adjusted skewness parameters,
means, and specific sample sizes.
Usage
replext_t3_c4.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(4, 3, 5, 4, 6, 4),
n2 = c(2, 4, 3, 5, 3, 6),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group, specific to unequal sample size scenarios. |
n2 |
Vector of sample sizes for the second group, corresponding to n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), reflecting the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c4.1(n1 = c(4), n2 = c(3), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 4.2
Description
This function is designed to replicate and extend the statistical power analysis
from Table 3 cell block 4.2 in the paper by Dwivedi et al. (2017). It addresses
scenarios with unequal sample sizes, the same skewed distribution, but different
variances between the two groups. The function acts as a wrapper around
replext_t2_c1.1
, applying specific skewness parameters, variances, and
unequal sample sizes.
Usage
replext_t3_c4.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0.8,
Sk2 = 0.8,
n1 = c(4, 3, 5, 4, 6, 4),
n2 = c(2, 4, 3, 5, 3, 6),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, designed for unequal sample sizes. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), representing the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c4.2(n1 = c(6), n2 = c(3), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 5.1
Description
This function is designed to replicate and extend the statistical power analysis
from Table 3 cell block 5.1 in the paper by Dwivedi et al. (2017). It focuses on
scenarios with normal distribution and unequal sample sizes, using the same
means and variances for both groups. It acts as a wrapper around
replext_t2_c1.1
, with modifications in means and sample sizes.
Usage
replext_t3_c5.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6),
n2 = c(7, 11, 10, 9),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of unequal sample sizes for the second group. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), representing the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c5.1(n1 = c(4), n2 = c(11), n_simulations = 1)
Replicate and Extend Statistical Power Analysis from Table 3 Cell 5.2
Description
This function is tailored to replicate and extend the statistical power analysis
from Table 3 cell block 5.2 in the paper by Dwivedi et al. (2017). It covers
scenarios with normal distribution, unequal sample sizes, and different variances
in the two groups. The function uses replext_t2_c1.1
for its calculations,
with adjusted means, variances, and sample sizes.
Usage
replext_t3_c5.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = NULL,
Sk2 = NULL,
n1 = c(3, 4, 5, 6),
n2 = c(7, 11, 10, 9),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is NULL (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is NULL (normal distribution). |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of unequal sample sizes for the second group. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTT), indicating the power analysis.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_t3_c5.2(n1 = c(4), n2 = c(11), n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 1.1
Description
This function aims to replicate and extend the simulation results from Table 4 cell 1.1 of the paper by Dwivedi et al. (2017). The default parameters are set to replicate the results for the lognormal distribution scenarios as presented in the paper, while modifying the parameter values allows for an extension of these results.
Usage
replext_t4_c1.1(
rdist = "rlnorm",
par1_1 = 1,
par2_1 = 0.6,
par1_2 = 2,
par2_2 = 1,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, default is 'rlnorm' (lognormal). Other options are 'rpois' (Poisson), 'rchisq' (Chi-squared), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 1. |
par2_1 |
Second parameter for the first group's distribution, default is 0.6. |
par1_2 |
First parameter for the second group's distribution, default is 2. |
par2_2 |
Second parameter for the second group's distribution, default is 1. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c1.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 2.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1' designed to replicate and extend the simulation results from Table 4 cell 2.1 of the paper by Dwivedi et al. (2017). The default parameters are modified to align with the Poisson distribution scenarios as described in the paper. Adjusting the parameters enables the extension of these results.
Usage
replext_t4_c2.1(
rdist = "rpois",
par1_1 = 5,
par2_1 = NULL,
par1_2 = 10,
par2_2 = NULL,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rpois' (Poisson). Other options include 'rlnorm' (lognormal), 'rchisq' (Chi-squared), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 5 for Poisson's lambda. |
par2_1 |
Second parameter for the first group's distribution, typically NULL for Poisson. |
par1_2 |
First parameter for the second group's distribution, default is 10 for Poisson's lambda. |
par2_2 |
Second parameter for the second group's distribution, typically NULL for Poisson. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c2.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 3.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1' intended to replicate and extend the simulation results from Table 4 cell 3.1 of the paper by Dwivedi et al. (2017). The default parameters are configured to match the Chi-squared distribution scenarios as detailed in the paper. Adjusting these parameters allows users to extend these results further.
Usage
replext_t4_c3.1(
rdist = "rchisq",
par1_1 = 3,
par2_1 = 0,
par1_2 = 6,
par2_2 = 0,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rchisq' (Chi-squared). Other options include 'rlnorm' (lognormal), 'rpois' (Poisson), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 3 for Chi-squared's degrees of freedom (df). |
par2_1 |
Second parameter for the first group's distribution, typically 0 for Chi-squared. |
par1_2 |
First parameter for the second group's distribution, default is 6 for Chi-squared's degrees of freedom (df). |
par2_2 |
Second parameter for the second group's distribution, typically 0 for Chi-squared. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c3.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 4.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1', tailored to replicate and extend the simulation results from Table 4 cell 4.1 of the paper by Dwivedi et al. (2017). It sets the default parameters to correspond with the lognormal distribution scenarios for this specific cell, allowing for both replication and extension of the results.
Usage
replext_t4_c4.1(
rdist = "rlnorm",
par1_1 = 1,
par2_1 = 0.6,
par1_2 = 3,
par2_2 = 4,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rlnorm' (lognormal). Other options include 'rpois' (Poisson), 'rchisq' (Chi-squared), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter (meanlog) for the first group's distribution, default is 1. |
par2_1 |
Second parameter (sdlog) for the first group's distribution, default is 0.6. |
par1_2 |
First parameter (meanlog) for the second group's distribution, default is 3. |
par2_2 |
Second parameter (sdlog) for the second group's distribution, default is 4. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c4.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 5.1
Description
This function is a specialized version of 'replext_t4_c1.1', designed to replicate and extend the simulation results from Table 4 cell 5.1 of the paper by Dwivedi et al. (2017). It adjusts the default parameters to match the Cauchy distribution scenarios as described in this particular cell, facilitating both replication and extension of these results.
Usage
replext_t4_c5.1(
rdist = "rcauchy",
par1_1 = 5,
par2_1 = 2,
par1_2 = 10,
par2_2 = 4,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rcauchy' (Cauchy). Other options include 'rlnorm' (lognormal), 'rpois' (Poisson), and 'rchisq' (Chi-squared). |
par1_1 |
First parameter (location) for the first group's distribution, default is 5. |
par2_1 |
Second parameter (scale) for the first group's distribution, default is 2. |
par1_2 |
First parameter (location) for the second group's distribution, default is 10. |
par2_2 |
Second parameter (scale) for the second group's distribution, default is 4. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c5.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 6.1
Description
This function, a specialized variant of 'replext_t4_c1.1', is designed to replicate and extend the simulation results from Table 4 cell 6.1 of the paper by Dwivedi et al. (2017). It employs different distributions for the two groups, using Chi-squared and Poisson distributions respectively, in line with the specific cell conditions.
Usage
replext_t4_c6.1(
rdist = c("rchisq", "rpois"),
par1_1 = 6,
par2_1 = 0,
par1_2 = 10,
par2_2 = NULL,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Vector of distribution types, with the defaults set to 'rchisq' (Chi-squared) for the first group and 'rpois' (Poisson) for the second group. Other options include 'rlnorm' (lognormal) and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 6 for Chi-squared's degrees of freedom. |
par2_1 |
Second parameter for the first group's distribution, typically 0 for Chi-squared. |
par1_2 |
First parameter for the second group's distribution, default is 10 for Poisson's lambda. |
par2_2 |
Second parameter for the second group's distribution, typically NULL for Poisson. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is typically 0 as 'ncp' (non-centrality parameter) is not often used. Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c6.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Simulation Results from Table 4 Cell 7.1
Description
This function is a customized version of 'replext_t4_c1.1', created to replicate and extend the simulation results from Table 4 cell 7.1 of the paper by Dwivedi et al. (2017). It is configured to use different distributions for each group, specifically a lognormal distribution for the first group and a Chi-squared distribution for the second group, aligning with the specific cell conditions.
Usage
replext_t4_c7.1(
rdist = c("rlnorm", "rchisq"),
par1_1 = 1,
par2_1 = 0.6,
par1_2 = 6,
par2_2 = 0,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Vector of distribution types, with the defaults set to 'rlnorm' (lognormal) for the first group and 'rchisq' (Chi-squared) for the second group. Other options include 'rpois' (Poisson) and 'rcauchy' (Cauchy). |
par1_1 |
First parameter (meanlog) for the first group's lognormal distribution, default is 1. |
par2_1 |
Second parameter (sdlog) for the first group's lognormal distribution, default is 0.6. |
par1_2 |
First parameter (df) for the second group's Chi-squared distribution, default is 6. |
par2_2 |
Second parameter for the second group's Chi-squared distribution, typically 0. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is typically 0 as 'ncp' (non-centrality parameter) is not often used. Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t4_c7.1(n1 = c(10), n2 = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions
Description
This function aims to replicate and extend the simulation results from Table 5 cell 1.1 of the paper by Dwivedi et al. (2017) for paired distributions with the option to use either normal or skew normal distributions. It allows specifying means, standard deviations, skewness, and correlation for two paired distributions.
Usage
replext_t5_c1.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0,
Sk2 = 0,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0 (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0 (normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c1.1(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions with Different Variances
Description
This function is a wrapper around 'replext_t5_c1.1' and is specifically aimed at replicating and extending simulation results from Table 5 cell 1.2 of the paper by Dwivedi et al. (2017). It is tailored for paired distributions with the option to use either normal or skew normal distributions, differing in standard deviations between the two groups.
Usage
replext_t5_c1.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0,
Sk2 = 0,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0 (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0 (normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with differing standard deviations for the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c1.2(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions with Skewness
Description
This function, serving as a wrapper around 'replext_t5_c1.1', is designed to replicate and extend the simulation results from Table 5 cell 1.3 of the paper by Dwivedi et al. (2017). It focuses on paired distributions featuring both normal and skew normal distributions, with specified skewness parameters for each group.
Usage
replext_t5_c1.3(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0.5,
Sk2 = 0.5,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.5. |
Sk2 |
Skewness parameter for the second group, default is 0.5. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with skewness parameters for the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c1.3(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions with Skewness and Different Variances
Description
This function is a wrapper around 'replext_t5_c1.1', targeting the replication and extension of simulation results from Table 5 cell 2.1 of the paper by Dwivedi et al. (2017). It focuses on paired distributions that combine normal and skew normal behaviors with different standard deviations and specified skewness parameters for each group.
Usage
replext_t5_c2.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0.5,
Sk2 = 0.5,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.5 (indicating skew normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0.5 (indicating skew normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with variations in standard deviations and skewness.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c2.1(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions with Different Skewness Levels
Description
This function is a specialized version of 'replext_t5_c1.1', tailored to replicate and extend the simulation results from Table 5 cell 2.2 of the paper by Dwivedi et al. (2017). It is designed for paired distributions that exhibit both normal and skew normal characteristics, with different skewness parameters for each group while maintaining the same means and standard deviations.
Usage
replext_t5_c2.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
Sk1 = 0.2,
Sk2 = 0.8,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.2. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), with a focus on differing skewness levels between the two groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c2.2(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results for Paired Distributions with Varied Skewness and Standard Deviations
Description
replext_t5_c2.3
is a wrapper function around replext_t5_c1.1
, specifically
designed to replicate and extend the simulation results from Table 5 cell 2.3 of
the paper by Dwivedi et al. (2017). It focuses on paired distributions that exhibit
skew normal characteristics with differing skewness parameters and standard deviations
for each group.
Usage
replext_t5_c2.3(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 3,
Sk1 = 0.2,
Sk2 = 0.8,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.2. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), focusing on variations in skewness and standard deviations between the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t5_c2.3(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions
Description
This function is a wrapper around 'replext_t5_c1.1' and is specifically aimed at replicating and extending statistical power simulation results from Table 6 cell 1.1 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c1.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0,
Sk2 = 0,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0 (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0 (normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with differing standard deviations for the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c1.1(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions with Different Variances
Description
This function is a wrapper around 'replext_t5_c1.1' and is specifically aimed at replicating and extending statistical power simulation results from Table 6 cell 1.2 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c1.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0,
Sk2 = 0,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0 (normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0 (normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with differing standard deviations for the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c1.2(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions with Skewness
Description
This function, serving as a wrapper around 'replext_t5_c1.1', is designed to replicate and extend the statistical power simulation results from Table 6 cell 1.3 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c1.3(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0.5,
Sk2 = 0.5,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.5. |
Sk2 |
Skewness parameter for the second group, default is 0.5. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with skewness parameters for the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c1.3(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions with Skewness and Different Variances
Description
This function is a wrapper around 'replext_t5_c1.1', targeting the replication and extension of statistical power simulation results from Table 6 cell 2.1 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c2.1(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0.5,
Sk2 = 0.5,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.5 (indicating skew normal distribution). |
Sk2 |
Skewness parameter for the second group, default is 0.5 (indicating skew normal distribution). |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), similar to 'replext_t5_c1.1' but with variations in standard deviations and skewness.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c2.1(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions with Different Skewness Levels
Description
This function is a specialized version of 'replext_t5_c1.1', tailored to replicate and extend the statistical power simulation results from Table 6 cell 2.2 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c2.2(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 1,
Sk1 = 0.2,
Sk2 = 0.8,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.2. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), with a focus on differing skewness levels between the two groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c2.2(n = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Simulation Results for Paired Distributions with Varied Skewness and Standard Deviations
Description
replext_t6_c2.3
is a wrapper function around replext_t5_c1.1
, specifically
designed to replicate and extend the statistical power simulation results from
Table 6 cell 2.3 of the paper by Dwivedi et al. (2017).
Usage
replext_t6_c2.3(
M1 = 5,
S1 = 1,
M2 = 7,
S2 = 3,
Sk1 = 0.2,
Sk2 = 0.8,
correl = 0.8,
n = c(3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 7. |
S2 |
Standard deviation for the second group, default is 3. |
Sk1 |
Skewness parameter for the first group, default is 0.2. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
correl |
Correlation between the two groups, default is 0.8. |
n |
Vector of sample sizes for the paired groups. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size and the proportions of significant p-values for each test (PT, NPBTT, WRST, PTT), focusing on variations in skewness and standard deviations between the groups.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_t6_c2.3(n = c(10), n_simulations = 1)
Replicate and Extend Simulation Results from Table S1 Cell 1.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1' designed to replicate and extend the type I error simulation results from Table S1 cell 1.1 of the paper by Dwivedi et al. (2017).
Usage
replext_ts1_c1.1(
rdist = "rlnorm",
par1_1 = 1,
par2_1 = 0.6,
par1_2 = 1,
par2_2 = 0.6,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, default is 'rlnorm' (lognormal). Other options are 'rpois' (Poisson), 'rchisq' (Chi-squared), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 1. |
par2_1 |
Second parameter for the first group's distribution, default is 0.6. |
par1_2 |
First parameter for the second group's distribution, default is 1. |
par2_2 |
Second parameter for the second group's distribution, default is 0.6. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_ts1_c1.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Simulation Results from Table S1 Cell 2.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1' designed to replicate and extend the type I error simulation results from Table S1 cell 2.1 of the paper by Dwivedi et al. (2017). The default parameters are modified to align with the Poisson distribution scenarios as described in the paper. Adjusting the parameters enables the extension of these results.
Usage
replext_ts1_c2.1(
rdist = "rpois",
par1_1 = 5,
par2_1 = NULL,
par1_2 = 5,
par2_2 = NULL,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rpois' (Poisson). Other options include 'rlnorm' (lognormal), 'rchisq' (Chi-squared), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 5 for Poisson's lambda. |
par2_1 |
Second parameter for the first group's distribution, typically NULL for Poisson. |
par1_2 |
First parameter for the second group's distribution, default is 5 for Poisson's lambda. |
par2_2 |
Second parameter for the second group's distribution, typically NULL for Poisson. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_ts1_c2.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Simulation Results from Table S1 Cell 3.1
Description
This function is a specialized wrapper around 'replext_t4_c1.1' intended to replicate and extend the type I error simulation results from Table S1 cell 3.1 of the paper by Dwivedi et al. (2017). The default parameters are configured to match the Chi-squared distribution scenarios as detailed in the paper. Adjusting these parameters allows users to extend these results further.
Usage
replext_ts1_c3.1(
rdist = "rchisq",
par1_1 = 3,
par2_1 = 0,
par1_2 = 3,
par2_2 = 0,
n1 = c(5, 5, 10),
n2 = c(5, 10, 10),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
rdist |
Distribution type, with the default set to 'rchisq' (Chi-squared). Other options include 'rlnorm' (lognormal), 'rpois' (Poisson), and 'rcauchy' (Cauchy). |
par1_1 |
First parameter for the first group's distribution, default is 3 for Chi-squared's degrees of freedom (df). |
par2_1 |
Second parameter for the first group's distribution, typically 0 for Chi-squared. |
par1_2 |
First parameter for the second group's distribution, default is 3 for Chi-squared's degrees of freedom (df). |
par2_2 |
Second parameter for the second group's distribution, typically 0 for Chi-squared. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group, must be the same length as n1. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size pair (n1, n2) and the proportions of significant p-values for each test (ST, WT, NPBTT, WRST, PTTa, PTTe).
Note
When using rlnorm (lognormal distribution), 'par1' represents 'meanlog' (the mean of the logarithms) and 'par2' represents 'sdlog' (the standard deviation of the logarithms). For rpois (Poisson distribution), 'par1' is 'lambda' (the rate parameter). In the case of rchisq (Chi-squared distribution), 'par1' is 'df' (degrees of freedom) and 'par2' is 'ncp' (non-centrality parameter). Lastly, for rcauchy (Cauchy distribution), 'par1' is the 'location' parameter and 'par2' is the 'scale' parameter.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_ts1_c3.1(n1 = c(10), n2 = c(10),n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA in a Three-Sample Setting
Description
This function aims to replicate and extend the Type I error rate analysis for ANOVA (Analysis of Variance) from the supplemental tables of the paper by Dwivedi et al. (2017). It allows for the simulation of three-sample scenarios with the option to use either normal or skew normal distributions, and performs various statistical tests to assess the Type I error rates.
Usage
replext_ts2_c1.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
M3 = 5,
S3 = 1,
Sk1 = NULL,
Sk2 = NULL,
Sk3 = NULL,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, NULL implies normal distribution. |
Sk2 |
Skewness parameter for the second group, NULL implies normal distribution. |
Sk3 |
Skewness parameter for the third group, NULL implies normal distribution. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_ts2_c1.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA in a Different Setting
Description
This wrapper function is designed to reproduce or extend the Type I error rate analysis for
ANOVA (Analysis of Variance) in a different setting as compared to replext_ts2_c1.1
. It utilizes
different default values for the standard deviations of the second and third groups, allowing
for a different simulation setup. It is part of the analysis extending the supplemental tables
of the paper by Dwivedi et al. (2017).
Usage
replext_ts2_c1.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 2,
M3 = 5,
S3 = 4,
Sk1 = NULL,
Sk2 = NULL,
Sk3 = NULL,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, NULL implies normal distribution. |
Sk2 |
Skewness parameter for the second group, NULL implies normal distribution. |
Sk3 |
Skewness parameter for the third group, NULL implies normal distribution. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame similar to replext_ts2_c1.1
with columns for each sample size combination
(n1, n2, n3) and the proportions of significant p-values for each test (ANOVA,
Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test), but with the modified
default parameters.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts2_c1.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Skewness
Description
This function, replext_ts2_c2.1
, extends the replext_ts2_c1.1
function to specifically
simulate scenarios under skew normal distributions. It is tailored to explore the impact of
skewness on the Type I error rates in ANOVA (Analysis of Variance), contributing to the
comprehensive analysis in the context of the study by Dwivedi et al. (2017). The function allows
for simulations under the assumption of skewness in all three groups.
Usage
replext_ts2_c2.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
M3 = 5,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results similar to those from replext_ts2_c1.1
, but with the added
dimension of skewness. The data frame includes columns for each sample size combination
(n1, n2, n3) and the proportions of significant p-values for each test (ANOVA,
Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test) under skew normal distribution.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts2_c2.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Skewness and Varied Standard Deviations
Description
The replext_ts2_c2.2
function extends the replext_ts2_c1.1
function by incorporating skewness
in data distributions and utilizing different default values for standard deviations in the
second and third groups. This function is specifically designed to investigate the influence of
skewness combined with varying standard deviations on the Type I error rates in ANOVA (Analysis of Variance).
It aligns with the broader analytical goals set in the study by Dwivedi et al. (2017), offering
insights into the behavior of statistical tests under these conditions.
Usage
replext_ts2_c2.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 2,
M3 = 5,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results that extend those from replext_ts2_c1.1
, focusing on the impact
of skewness and varying standard deviations. The data frame includes columns for each
sample size combination (n1, n2, n3) and the proportions of significant p-values for
each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test)
under these specific conditions.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
replext_ts2_c1.1
, replext_ts2_c2.1
Examples
replext_ts2_c2.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Diverse Skewness Parameters
Description
The replext_ts2_c3.1
function is designed to replicate and extend Type I error rate analysis
for ANOVA (Analysis of Variance) with a specific focus on the impact of different skewness parameters
across the three groups. This function is a variation of replext_ts2_c1.1
, providing an
opportunity to explore how varying degrees of skewness in each group affect the statistical
inferences in ANOVA, as part of the extended analysis in the context of the study by Dwivedi et al. (2017).
Usage
replext_ts2_c3.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
M3 = 5,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 1,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 1. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results that build upon those from replext_ts2_c1.1
. The data frame
includes columns for each sample size combination (n1, n2, n3) and the proportions of
significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test,
Permutation F-test) under the specified skewness conditions for each group.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts2_c3.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Varied Skewness and Standard Deviations
Description
The replext_ts2_c3.2
function is a modification of the replext_ts2_c1.1
function, designed to
explore the impact of both skewness and different standard deviations in a three-sample ANOVA setting.
This variant maintains skewness in all groups but changes the default standard deviations for the
second and third groups. It contributes to a more comprehensive understanding of Type I error rates
in the context of the study by Dwivedi et al. (2017), especially under conditions of non-normality.
Usage
replext_ts2_c3.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 2,
M3 = 5,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 1,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 1. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results that extend those from replext_ts2_c1.1
. This data frame
includes columns for each sample size combination (n1, n2, n3) and the proportions of
significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test,
Permutation F-test), under the specific conditions of varying skewness and standard deviations.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
replext_ts2_c1.1
, replext_ts2_c3.1
Examples
replext_ts2_c3.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Skewness in Specific Sample Size Combinations
Description
The replext_ts2_c4.1
function is a specialized version of replext_ts2_c1.1
, designed to analyze
Type I error rates in ANOVA settings with skewness in data distributions and tailored combinations
of sample sizes for each group. This function explores the impact of non-normality (skewness) and
varying group sizes, thereby extending the analysis framework of the study by Dwivedi et al. (2017).
Usage
replext_ts2_c4.1(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 1,
M3 = 5,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 2, 2, 3, 2, 2, 3, 2, 3, 2),
n2 = c(2, 3, 3, 4, 2, 3, 4, 2, 4, 2),
n3 = c(3, 3, 4, 3, 6, 6, 4, 7, 5, 8),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of specific sample sizes for the first group. |
n2 |
Vector of specific sample sizes for the second group. |
n3 |
Vector of specific sample sizes for the third group, not necessarily the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results extending those from replext_ts2_c1.1
, focusing on the
combined effects of skewness and specific sample size configurations. The data frame
includes columns for each unique sample size combination (n1, n2, n3) and the proportions
of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test,
Permutation F-test) in these particular scenarios.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts2_c4.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Type I Error Rates for ANOVA with Specific Sample Size Combinations
Description
replext_ts2_c4.2
is designed to explore the impact of specific combinations of sample sizes
on the Type I error rates in ANOVA (Analysis of Variance) under conditions of skewness and
varying standard deviations. This function extends replext_ts2_c1.1
by utilizing unique sample
size combinations along with altered default standard deviations and skewness parameters. It is
part of a broader analysis aimed at understanding statistical behavior in skewed and heteroscedastic
scenarios, aligning with the research context provided by Dwivedi et al. (2017).
Usage
replext_ts2_c4.2(
M1 = 5,
S1 = 1,
M2 = 5,
S2 = 2,
M3 = 5,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 2, 2, 3, 2, 2, 3, 2, 3, 2),
n2 = c(2, 3, 3, 4, 2, 3, 4, 2, 4, 2),
n3 = c(3, 3, 4, 3, 6, 6, 4, 7, 5, 8),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 5. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 5. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group, with specific combinations. |
n2 |
Vector of sample sizes for the second group, with specific combinations. |
n3 |
Vector of sample sizes for the third group, with specific combinations. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with results extending those from replext_ts2_c1.1
. This data frame
provides insights into the Type I error rates for each test (ANOVA, Kruskal-Wallis,
Nonparametric Bootstrap F-test, Permutation F-test) under the conditions of skewness,
varying sample sizes, and varying standrd deviations.
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts2_c4.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA in a Three-Sample Setting
Description
This function aims to replicate and extend the statistical power analysis for
ANOVA (Analysis of Variance) from the supplemental tables of the paper by
Dwivedi et al. (2017). It allows for the simulation of three-sample scenarios
with the option to use either normal or skew normal distributions, and
performs various statistical tests to assess the statistical power. The function
is a wrapper around replext_ts2_c1.1
.
Usage
replext_ts3_c1.1(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 1,
M3 = 7,
S3 = 1,
Sk1 = NULL,
Sk2 = NULL,
Sk3 = NULL,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, NULL implies normal distribution. |
Sk2 |
Skewness parameter for the second group, NULL implies normal distribution. |
Sk3 |
Skewness parameter for the third group, NULL implies normal distribution. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
Examples
replext_ts3_c1.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 1.2.
Usage
replext_ts3_c1.2(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 2,
M3 = 7,
S3 = 4,
Sk1 = NULL,
Sk2 = NULL,
Sk3 = NULL,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, NULL implies normal distribution. |
Sk2 |
Skewness parameter for the second group, NULL implies normal distribution. |
Sk3 |
Skewness parameter for the third group, NULL implies normal distribution. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c1.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Skewness
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 2.1.
Usage
replext_ts3_c2.1(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 1,
M3 = 7,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c2.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Skewness and Varied Standard Deviations
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 2.2.
Usage
replext_ts3_c2.2(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 2,
M3 = 7,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c2.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Diverse Skewness Parameters
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 3.1.
Usage
replext_ts3_c3.1(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 1,
M3 = 7,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 1,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 1. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c3.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Varied Skewness and Standard Deviations
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 3.2.
Usage
replext_ts3_c3.2(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 2,
M3 = 7,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 1,
n1 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n2 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n3 = c(2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 25, 50, 100),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 1. |
n1 |
Vector of sample sizes for the first group. |
n2 |
Vector of sample sizes for the second group. |
n3 |
Vector of sample sizes for the third group, must be the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c3.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Skewness in Specific Sample Size Combinations
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 4.1.
Usage
replext_ts3_c4.1(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 1,
M3 = 7,
S3 = 1,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 2, 2, 3, 2, 2, 3, 2, 3, 2),
n2 = c(2, 3, 3, 4, 2, 3, 4, 2, 4, 2),
n3 = c(3, 3, 4, 3, 6, 6, 4, 7, 5, 8),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 1. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 1. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of specific sample sizes for the first group. |
n2 |
Vector of specific sample sizes for the second group. |
n3 |
Vector of specific sample sizes for the third group, not necessarily the same length as n1 and n2. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c4.1(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Replicate and Extend Statistical Power Analysis for ANOVA with Specific Sample Size Combinations
Description
This function is a wrapper around replext_ts2_c1.1
. The function is designed
to reproduce or extend the statistical power analysis for ANOVA (Analysis of
Variance) from Dwivedi et al. (2017) supplemental table 3, cell 4.2.
Usage
replext_ts3_c4.2(
M1 = 5,
S1 = 1,
M2 = 6,
S2 = 2,
M3 = 7,
S3 = 4,
Sk1 = 0.8,
Sk2 = 0.8,
Sk3 = 0.8,
n1 = c(2, 2, 2, 3, 2, 2, 3, 2, 3, 2),
n2 = c(2, 3, 3, 4, 2, 3, 4, 2, 4, 2),
n3 = c(3, 3, 4, 3, 6, 6, 4, 7, 5, 8),
n_simulations = 10000,
nboot = 1000,
conf.level = 0.95
)
Arguments
M1 |
Mean for the first group, default is 5. |
S1 |
Standard deviation for the first group, default is 1. |
M2 |
Mean for the second group, default is 6. |
S2 |
Standard deviation for the second group, default is 2. |
M3 |
Mean for the third group, default is 7. |
S3 |
Standard deviation for the third group, default is 4. |
Sk1 |
Skewness parameter for the first group, default is 0.8. |
Sk2 |
Skewness parameter for the second group, default is 0.8. |
Sk3 |
Skewness parameter for the third group, default is 0.8. |
n1 |
Vector of sample sizes for the first group, with specific combinations. |
n2 |
Vector of sample sizes for the second group, with specific combinations. |
n3 |
Vector of sample sizes for the third group, with specific combinations. |
n_simulations |
Number of simulations to run, default is 10,000. |
nboot |
Number of bootstrap samples for the nonparametric bootstrap test, default is 1000. |
conf.level |
Confidence level for calculating p-value thresholds, default is 0.95. |
Value
A data frame with columns for each sample size combination (n1, n2, n3) and the proportions of significant p-values for each test (ANOVA, Kruskal-Wallis, Nonparametric Bootstrap F-test, Permutation F-test).
References
Dwivedi AK, Mallawaarachchi I, Alvarado LA. Analysis of small sample size studies using nonparametric bootstrap test with pooled resampling method. Stat Med. 2017 Jun 30;36(14):2187-2205. doi: 10.1002/sim.7263. Epub 2017 Mar 9. PMID: 28276584.
See Also
Examples
replext_ts3_c4.2(n1 = c(10), n2 = c(10), n3 = c(10), n_simulations = 1)
Execute Simulation Based on User Inputs
Description
This internal function manages the simulation process in a Shiny app environment. It dynamically selects the appropriate simulation function based on the selected cell block and passes user inputs to this function. The function also handles the setting of a random number seed, if provided, to ensure reproducibility of results.
Usage
runSimulation(input)
Arguments
input |
A list of inputs gathered from the Shiny app's UI, including the selected cell block and other parameters necessary for the simulation. |
Value
The result of the simulation function that corresponds to the selected cell block. This result is typically a data frame containing the outcomes of the simulation.
Convert Comma-Separated String to Character Vector
Description
This internal function takes a string of comma-separated values and converts it into a character vector. It is used to process user inputs from the Shiny app's UI, particularly when these inputs need to be retained as character data.
Usage
text_to_char_vector(text_input)
Arguments
text_input |
A string containing comma-separated values, typically user input from the Shiny app's UI. The function trims leading and trailing whitespace before processing. |
Value
A character vector converted from the comma-separated string. If the input is an empty string or consists only of whitespace, returns an empty character vector.