You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
TheForCausality package provides a curated and comprehensive collection of datasets designed forcausal inference research. It brings together data from diverse domains such asclinical trials, cancer studies, epidemiological surveys, environmental exposures, and health-related observational studies.
Installation
You can install theForCausality package from CRAN with the following R function:
install.packages("ForCausality")
Dataset Suffixes
Each dataset inForCausality is labeled with asufix to indicate its structure and type:
_df: A standar dataframe.
_tbl_df: A tibble data frame object.
_list: A list object.
Datasets included in ForCausality
Colon_df: Chemotherapy for Stage B/C colon cancer
Stroke_df: Fictional ischemic stroke data case control data with risk factors, exposures and confounders
Pph_df: An external control trial of treatments for post-partum hemorrhage
Example Code:
# Load the packagelibrary(ForCausality)# Load a dataset from the packagedata(Colon_df)# Show the first six rows of the datasethead(Colon_df)# Display the structure of the datasetstr(Colon_df)# Summarize key variablessummary(Colon_df)# Visualize treatment groups and survival statustable(Colon_df$treatment,Colon_df$survival)# Open the dataset in the RStudio viewerView(Colon_df)