Package: covalchemy 1.0.0

Naman Agrawal

covalchemy: Constructing Joint Distributions with Control Over Statistical Properties

Synthesizing joint distributions from marginal densities, focusing on controlling key statistical properties such as correlation for continuous data, mutual information for categorical data, and inducing Simpson's Paradox. Generate datasets with specified correlation structures for continuous variables, adjust mutual information between categorical variables, and manipulate subgroup correlations to intentionally create Simpson's Paradox. Joe (1997) <doi:10.1201/b13150> Sklar (1959) <https://en.wikipedia.org/wiki/Sklar%27s_theorem>.

Authors:Naman Agrawal [aut, cre]

covalchemy_1.0.0.tar.gz
covalchemy_1.0.0.tar.gz(r-4.5-noble)covalchemy_1.0.0.tar.gz(r-4.4-noble)
covalchemy_1.0.0.tgz(r-4.4-emscripten)covalchemy_1.0.0.tgz(r-4.3-emscripten)
covalchemy.pdf |covalchemy.html
covalchemy/json (API)

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

Peer review:

Bug tracker:https://github.com/namanlab/covalchemy/issues

1.70 score 1 scripts 65 downloads 27 exports 105 dependencies

Last updated 4 days agofrom:664de65e43. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 25 2024
R-4.5-linuxOKNov 25 2024

Exports:augment_matrix_random_blockcalculate_tv_distance_empiricalentropy_pairgaussian_copula_two_varsgen_number_1gen_number_maxgen_number_mingenCDFInv_akimagenCDFInv_lineargenCDFInv_polygenCDFInv_quantilegenerate_gaussian_copula_samplesgenerate_t_copula_samplesget_mutual_informationget_optimal_gridget_simpsons_paradox_cget_simpsons_paradox_dget_target_corrget_target_entropylog_odds_dcobjective_function_SLplot_log_oddssimulated_annealing_MIsimulated_annealing_SLsinkhorn_algorithmsoftmaxt_copula_two_vars

Dependencies:askpassbase64encbitbit64bootbslibcachemcellrangerclassclicliprclueclustercolorspacecolourpickercommonmarkcpp11crayoncurldata.tabledeldirDescToolsdigestdplyre1071evaluateExactexpmfansifarverfastmapfontawesomeforcatsfsgenericsggExtraggplot2gldgluegridExtragtablehavenhighrhmshtmltoolshtmlwidgetshttpuvhttrinterpisobandjquerylibjsonliteknitrlabelinglaterlatticelifecyclelmommagrittrMASSMatrixmemoisemgcvmimeminiUImunsellmvtnormnlmeopensslpillarpkgconfigprettyunitsprogresspromisesproxyR6rappdirsRColorBrewerRcppRcppEigenreadrreadxlrematchrlangrmarkdownrootSolverstudioapisassscalesshinyshinyjssourcetoolssystibbletidyselecttinytextzdbutf8vctrsviridisLitevroomwithrxfunxtableyaml

Readme and manuals

Help Manual

Help pageTopics
Augment Matrix with Random 2x2 Block Adjustmentaugment_matrix_random_block
Calculate Total Variation (TV) Distance Empiricallycalculate_tv_distance_empirical
Calculate Entropy of a Pairentropy_pair
Generate Gaussian Copula Samples for Two Variablesgaussian_copula_two_vars
Generate a New Number for Stepwise Modificationgen_number_1
Generate a New Number for Maximizing Mutual Informationgen_number_max
Generate a New Number for Minimizing Mutual Informationgen_number_min
Generate an Inverse CDF Function Using Akima Spline InterpolationgenCDFInv_akima
Generate an Inverse CDF Function Using Linear InterpolationgenCDFInv_linear
Generate an Inverse CDF Function Using Polynomial RegressiongenCDFInv_poly
Generate an Inverse CDF Function Using QuantilesgenCDFInv_quantile
Generate Gaussian Copula Samplesgenerate_gaussian_copula_samples
Generate t-Copula Samplesgenerate_t_copula_samples
Calculate Mutual Informationget_mutual_information
Get Optimal Grid Assignmentget_optimal_grid
Simpson's Paradox Transformation with Copula and Simulated Annealingget_simpsons_paradox_c
Introduce Simpson's Paradox in Discrete Dataget_simpsons_paradox_d
Generate Samples with Target Kendall's Tau Correlation Using a Copula Approachget_target_corr
Get Target Entropyget_target_entropy
Log-Odds Calculation for Concordant and Discordant Pairslog_odds_dc
Objective Function for Structural Learning (SL)objective_function_SL
Plot Log-Odds Before and After Transformationplot_log_odds
Simulated Annealing Algorithm with Target Entropy Stopping Conditionsimulated_annealing_MI
Simulated Annealing Optimization with Categorical Variable and R^2 Differencessimulated_annealing_SL
Sinkhorn Algorithm for Matrix Scalingsinkhorn_algorithm
Softmax Function with Special Handling for Infinite Valuessoftmax
Generate t-Copula Samples for Two Variablest_copula_two_vars