However, CreateTableOne reports an SMD of 0.172 which is above the threshold and thus not balanced. 0941, which is below the commonly accepted threshold of 0.1 and thus considered to be balanced. Variable with the greatest mean differenceĬhronic_pulmonary_disease_Yes -0.1569 Not Balanced, >0.1Īs is seen above, the SMD of malignancy after matching as calculated by the cobalt package is. Myocardial_infarction_Yes Binary 0.1561 -0.0683 Balanced, 0.1 Matchit(formula = formula, data = working_data, method = "nearest",ĭistance = "glm", replace = FALSE, caliper = 0.3, ratio = 4)ĭistance Distance 0.6876 0.0271 Balanced, 0.1 > matched_data = match.data(matched_data) > matched_data = matchit(formula, data = working_data, distance = "glm", method = "nearest", replace = FALSE, ratio = 4, caliper = 0.3) Here it is AFTER performing matching using the MatchIt package and assessing balance again with CreateTableOne: > formula = treated~ age_at_diagnosis + charlson_score + median_wbc_6mo + chemotherapy + radiation + smoking + alcohol + myocardial_infarction + congestive_heart_failure + peripheral_vascular_disease + cerebrovascular_disease + dementia + chronic_pulmonary_disease + rheumatic_disease + mild_liver_disease + diabetes_without_complication + diabetes_with_complication + hemiplegia_or_paraplegia + renal_disease + malignancy + metastatic_cancer + hiv_or_aids Here is the data BEFORE performing any matching using CreateTableOne: > print(CreateTableOne(vars = variables_for_table, strata = "treated", data = working_data), quote = FALSE, noSpaces = TRUE, smd = TRUE)Īge_at_diagnosis (mean (SD)) 64.37 (10.63) 62.40 (14.87) 0.316 0.153Ĭharlson_score (mean (SD)) 1.93 (2.19) 3.10 (3.81) 0.008 0.374 I tried two approaches to assess balance using both the CreateTableOne package as well as the cobalt package in R however I was getting differing results and wanted to ask the community if anyone had any suggestions on what may be causing the discrepancy. I was attempting to calculate standardized mean differences (SMDs) after performing propensity score matching to verify that balance was achieved, however was running into some discrepancies between packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |