Package: mpower 0.1.0

Phuc H. Nguyen

mpower: Power Analysis via Monte Carlo Simulation for Correlated Data

A flexible framework for power analysis using Monte Carlo simulation for settings in which considerations of the correlations between predictors are important. Users can set up a data generative model that preserves dependence structures among predictors given existing data (continuous, binary, or ordinal). Users can also generate power curves to assess the trade-offs between sample size, effect size, and power of a design. This package includes several statistical models common in environmental mixtures studies. For more details and tutorials, see Nguyen et al. (2022) <arxiv:2209.08036>.

Authors:Phuc H. Nguyen [aut, cre]

mpower_0.1.0.tar.gz
mpower_0.1.0.tar.gz(r-4.5-noble)mpower_0.1.0.tar.gz(r-4.4-noble)
mpower_0.1.0.tgz(r-4.4-emscripten)mpower_0.1.0.tgz(r-4.3-emscripten)
mpower.pdf |mpower.html
mpower/json (API)
NEWS

# Install 'mpower' in R:
install.packages('mpower', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:
  • nhanes1518 - NHANES data from 2015-2016 and 2017-2018 cycles

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

21 exports 1 stars 0.00 score 47 dependencies 8 scripts 231 downloads

Last updated 2 years agofrom:3eba894dc1. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 21 2024
R-4.5-linuxOKAug 21 2024

Exports:bkmr_wrapperbma_wrapperbws_wrapperestimate_snrfin_wrapperfitgenxgenyglm_wrapperInferenceModelMixtureModelmplotOutcomeModelplot_summaryqgcomp_lin_wrapperqmultinomscale_fscale_sigmasim_curvesim_powersummary

Dependencies:abindbootclicodetoolscolorspacecpp11doSNOWdplyrfansifarverforeachgenericsggplot2gluegtableisobanditeratorslabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigplyrpurrrR6RColorBrewerRcppreshape2rlangsbgcopscalessnowstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Fits a BKMR model with significance criteria: PIP and group-wise PIPbkmr_wrapper
Fits a linear model with Bayesian model selection with significance criteria: PIP and posterior probability of nonzero coefficients being on one side of zero.bma_wrapper
Fits a Bayesian weighted sumsbws_wrapper
Convert a correlation matrix into a partial correlation matrixcor2partial
Citation: Daniel Lewandowski, Dorota Kurowicka, Harry Joe, Generating random correlation matrices based on vines and extended onion method, Journal of Multivariate Analysis, Volume 100, Issue 9, 2009, Pages 1989-2001, ISSN 0047-259X, https://doi.org/10.1016/j.jmva.2009.04.008.cvine
Monte Carlo approximation of the SNRestimate_snr
Fits a Bayesian factor model with interactionsfin_wrapper
Fits the model to given data and gets a list of significance criteriafit
Generates a matrix of n observations of p predictorsgenx
Generates a vector of outcomesgeny
Fits a generalized linear modelglm_wrapper
Statistical model that returns significance criterionInferenceModel
Correlated predictors generatorMixtureModel
Visualize marginals and Gaussian copula correlations of simulated datamplot
mpower: Power analysis using Monte Carlo for correlated predictors.mpower
NHANES data from 2015-2016 and 2017-2018 cyclesnhanes1518
Outcome generatorOutcomeModel
Partial correlations between elements in x and elements in ypartial
Plot summaries of power simulationplot_summary
Fits a linear Quantile G-Computation model with no interactionsqgcomp_lin_wrapper
Quantile function for the multinomial distribution, size = 1qmultinom
Convert R-squared value to the SNRrsq2snr
Rescale the mean function of an OutcomeModel to meet a given SNRscale_f
Rescale the noise variance of a Gaussian OutcomeModel to meet a given SNRscale_sigma
This function updates values in an OutcomeModel objectset_value
Power curve using Monte Carlo simulationsim_curve
Power analysis using Monte Carlo simulationsim_power
Tabular summaries of power simulationsummary