Package: amp 1.0.1

amp: Statistical Test for the Multivariate Point Null Hypotheses

A testing framework for testing the multivariate point null hypothesis. A testing framework described in Elder et al. (2022) <arxiv:2203.01897> to test the multivariate point null hypothesis. After the user selects a parameter of interest and defines the assumed data generating mechanism, this information should be encoded in functions for the parameter estimator and its corresponding influence curve. Some parameter and data generating mechanism combinations have codings in this package, and are explained in detail in the article.

Authors:Adam Elder [aut, cre], Marco Carone [ths], Alex Luedtke [ths]

amp_1.0.1.tar.gz
amp_1.0.1.zip(r-4.5)amp_1.0.1.zip(r-4.4)amp_1.0.1.zip(r-4.3)
amp_1.0.1.tgz(r-4.4-any)amp_1.0.1.tgz(r-4.3-any)
amp_1.0.1.tar.gz(r-4.5-noble)amp_1.0.1.tar.gz(r-4.4-noble)
amp_1.0.1.tgz(r-4.4-emscripten)amp_1.0.1.tgz(r-4.3-emscripten)
amp.pdf |amp.html
amp/json (API)

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

Peer review:

Bug tracker:https://github.com/adam-s-elder/amp/issues

On CRAN:

4.11 score 13 scripts 268 downloads 18 exports 56 dependencies

Last updated 2 years agofrom:a25e72141f. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-winOKNov 17 2024
R-4.5-linuxOKNov 17 2024
R-4.4-winOKNov 17 2024
R-4.4-macOKNov 17 2024
R-4.3-winOKNov 17 2024
R-4.3-macOKNov 17 2024

Exports:add_oth_pvalscalc_gam_starfind_maggen_boot_sampleic.data.exampic.pearsonic.proj.rric.proj.rr.nolasl_p_normlook_ICmag_for_powmake_datamv_pn_testpval_for_magrr.msm.icrr.msm.jn.ictest.controlZL

Dependencies:bitopscaToolsclicodetoolscolorspacecpp11cvAUCdata.tabledplyrexpmfansifarverforeachgamgenericsggplot2glmnetgluegplotsgtablegtoolsisobanditeratorsKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmennlspillarpkgconfigpurrrR6RColorBrewerRcppRcppEigenrlangROCRscalesshapestringistringrSuperLearnersurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithr

Better Understanding Test Controls

Rendered fromtest_control.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2022-03-25
Started: 2022-02-22

Running a Multivariate Point-Null Test

Rendered fromrun_test.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2022-03-04
Started: 2022-02-02

Readme and manuals

Help Manual

Help pageTopics
Estimate the local acceptance rateaccept_rate
Add Other p-valuesadd_oth_pvals
A helper function for 'mv_pn_test', calculating the test statistic for both the vector of parameter estimates, and the draws from the corresponding estimated limiting distribution.calc_gam_star
A helper function to estimate the power using the generated test statistic, and estimated distribution of the test statistic.est_pows
A helper function to find the multiplicative distance of a specified alternative from the alternative in the same direction that obtains a power of 80%.find_mag
A helper function to generate a multiplier bootstrap samplegen_boot_sample
Helper function for the Zhang and Laber test.get_test_stat
Function for calculating the influence function used for the real data example.ic.data.examp
Pearson Correlation IC and estimateic.pearson
Estimate both the parameter, and the influence curves used for estimating the projected risk ratio. The first column of your data should correspond to the variable of interest.ic.proj.rr
Estimate both the parameter, and or the influence curves used for estimating the projected risk ratio (not using lasso). The first column of your data should correspond to the variable of interest.ic.proj.rr.nolas
A function used to calculate various L_p normsl_p_norm
This a function used to look at the IC.look_IC
This function is used to estimate the magnitude needed for a certain direction to achieve 80% power for a proposed alternative.mag_for_pow
Generate data using one of the four specified models from MCKEAGUE and QIAN papermake_data
Runs a multivariate point null test. This function returns an approximate p-value for the specified test statistic.mv_pn_test
A helper function that calculates the estimated p-value for a given observed alternative and a given norm.pval_for_mag
Estimate both the parameter, and the influence curves used for estimating the projected risk ratio from a working marginal structural mean model.rr.msm.ic
Estimate both the parameter, and the influence curves used for estimating the projected risk ratio from a working marginal structural mean model. This function only uses elastic net for the estimation (rather than also using other learners).rr.msm.jn.ic
Control function for the adaptive norm testtest.control
Carry out a simplified version of the Zhang and Laber test.ZL