R codes for implementing data analyses in the manuscript entitled "Dynamic lipid-lowering interventions reduce cardiovascular disease and all-cause mortality risk in the community-dwelling population: a target trial emulation using the Chinese Multi-provincial Cohort Study" (In principal acception).
- dynamicIntervention() defines the dynamic lipid-lowering interventions, including LDL-C, non-LDL-C, and lipid-lowering medications.
- Utilities() generates the Tables and Figures provided in the manuscript.
- lmtp_shiftDat_toGitHub() validates the parametric g-formula-based estimators using the subsequent doubly robust estimators, in which all info related to the Chinese Multi-provincial Cohort Study was removed. Please replace the info with your own data to run this function successfully.