Calculate the standard error, confidence interval, and p-value for the stability metrics of an Ising landscape using bootstrapping
Source:R/stability_se.R
calculate_stability_se.Rd
Note that the BCa method is used for stability differences, and the percentile method is used for stability measures of individual phases because the stability measures of individual phases are highly zero-inflated and may crash the BCa estimation procedure. The range estimation of the stability measures of individual phases should be interpreted with caution.
Usage
calculate_stability_se(
data,
split_value = 0.5 * ncol(data),
R = 1000,
IsingFit_options = list(plot = FALSE),
Isingland_options = list(),
...
)
# S3 method for class 'stability_se'
print(x, ...)
compare_stability(
data1,
data2,
split_value = 0.5 * ncol(data),
R = 1000,
IsingFit_options = list(plot = FALSE),
Isingland_options = list(),
...
)
Arguments
- data
A matrix of binary data
- split_value
An integer to specify the number of active nodes used to split two stability ranges. Default is half of the number of nodes.
- R
The number of bootstrap replicates. Usually this will be a single positive integer. For importance resampling, some resamples may use one set of weights and others use a different set of weights. In this case
R
would be a vector of integers where each component gives the number of resamples from each of the rows of weights.- IsingFit_options
Parameters passed to
IsingFit::IsingFit()
- Isingland_options
Parameters passed to
make_2d_Isingland()
- ...
Parameters passed to
boot::boot()
- x
An object of class
stability_se
- data1, data2
Two matrices of binary data
Details
Use calculate_stability_se()
for a single dataset, and use compare_stability()
for comparing the stability metrics of two groups.
If you encounter the error message "Error in if (any(ints)) out[inds[ints]] <- tstar[k[inds[ints]]] : missing value where TRUE/FALSE needed", you may need to install the patched version of the boot.pval
package with pak::pkg_install("Sciurus365/boot.pval@patch-1")
. See https://github.com/mthulin/boot.pval/issues/4.
If you encounter the error message "estimated adjustment 'a' is NA", that probably means you should increase the number of bootstrap samples (R
). See https://stats.stackexchange.com/questions/37918/why-is-the-error-estimated-adjustment-a-is-na-generated-from-r-boot-package.