The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
This package provides functions for manipulating data, including techniques for:
get_target_corr
function allows you to adjust the Kendall’s
tau correlation between two continuous variables using copula-based
methods. You can specify the target correlation, copula type (Gaussian
or t), and inverse CDF transformation method.get_target_entropy
function helps you achieve a desired
level of entropy (mutual information) between two categorical variables.
It works by iteratively adjusting the contingency table using simulated
annealing.get_simpsons_paradox_c
function allows you to explore the
Simpson’s Paradox phenomenon in continuous data. It transforms data
using Gaussian copulas and simulated annealing to create a scenario
where the overall trend contradicts subgroup trends.get_simpsons_paradox_d
function enables you to modify
contingency tables for categorical data to create or highlight a
Simpson’s Paradox-like effect. It employs simulated annealing to adjust
log-odds values while respecting specific constraints.To install the package, you can use the devtools package:
# Install devtools package if not already available
if (!requireNamespace("devtools")) install.packages("devtools")
::install_github("namanlab/covalchemy") devtools
Once installed, you can load the package and use its functions in your R scripts:
library(covalchemy)
# Example 1: Modifying correlation
<- rnorm(100)
x <- rnorm(100)
y <- 0.5
target_corr <- get_target_corr(x, y, target_corr)
res <- res$x1
modified_x <- res$x2
modified_y
# Example 2: Controlling entropy
<- data.frame(x = sample(c("A", "B", "C"), 1000, replace = TRUE),
df y = sample(c("D", "E", "F"), 1000, replace = TRUE))
<- 1.5
target_entropy <- get_target_entropy(df$x, df$y, target_entropy)
result <- result$final_df final_df
This readme provides a general overview of the package’s functionalities. Refer to the function documentation within the package for detailed information on arguments, return values, and specific usage examples.
This package was developed as part of the DSA42288S Final Year Project. I would like to express my gratitude to my supervisor, Dr. Vikneswaran Gopal, for his invaluable guidance, support, and mentorship throughout this project. I am also grateful to the faculty and staff at NUS for their continuous support, and to my family for their encouragement along the way.
For any questions or inquiries, please contact me at
naman.agr03@gmail.com
.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.