##
## Call:
## matchit(formula = fmlaMatching, data = df.peter.matchit, method = "nearest",
## link = "logit")
##
## Summary of Balance for All Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1179 0.5550
## Baseline_Age 64.6250 68.5505 -0.3859
## `as.factor(female0_male1)`0 0.7500 0.5229 0.5244
## `as.factor(female0_male1)`1 0.2500 0.4771 -0.5244
## PSPRSTOT 34.6875 30.1284 0.3020
## Var. Ratio eCDF Mean eCDF Max
## distance 3.3792 0.1978 0.3888
## Baseline_Age 1.6824 0.1008 0.3022
## `as.factor(female0_male1)`0 . 0.2271 0.2271
## `as.factor(female0_male1)`1 . 0.2271 0.2271
## PSPRSTOT 1.2210 0.0806 0.2563
##
## Summary of Balance for Matched Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1789 0.1250
## Baseline_Age 64.6250 64.6875 -0.0061
## `as.factor(female0_male1)`0 0.7500 0.6250 0.2887
## `as.factor(female0_male1)`1 0.2500 0.3750 -0.2887
## PSPRSTOT 34.6875 36.3125 -0.1076
## Var. Ratio eCDF Mean eCDF Max Std. Pair Dist.
## distance 2.0760 0.0102 0.1250 0.1298
## Baseline_Age 1.3024 0.0682 0.1875 0.7804
## `as.factor(female0_male1)`0 . 0.1250 0.1250 1.1547
## `as.factor(female0_male1)`1 . 0.1250 0.1250 1.1547
## PSPRSTOT 0.8474 0.0601 0.2500 0.9272
##
## Sample Sizes:
## Control Treated
## All 109 16
## Matched 16 16
## Unmatched 93 0
## Discarded 0 0
##
## Call:
## matchit(formula = fmlaMatching, data = df.peter.matchit, method = "optimal",
## link = "logit")
##
## Summary of Balance for All Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1179 0.5550
## Baseline_Age 64.6250 68.5505 -0.3859
## `as.factor(female0_male1)`0 0.7500 0.5229 0.5244
## `as.factor(female0_male1)`1 0.2500 0.4771 -0.5244
## PSPRSTOT 34.6875 30.1284 0.3020
## Var. Ratio eCDF Mean eCDF Max
## distance 3.3792 0.1978 0.3888
## Baseline_Age 1.6824 0.1008 0.3022
## `as.factor(female0_male1)`0 . 0.2271 0.2271
## `as.factor(female0_male1)`1 . 0.2271 0.2271
## PSPRSTOT 1.2210 0.0806 0.2563
##
## Summary of Balance for Matched Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1789 0.1250
## Baseline_Age 64.6250 64.6875 -0.0061
## `as.factor(female0_male1)`0 0.7500 0.6250 0.2887
## `as.factor(female0_male1)`1 0.2500 0.3750 -0.2887
## PSPRSTOT 34.6875 36.3125 -0.1076
## Var. Ratio eCDF Mean eCDF Max Std. Pair Dist.
## distance 2.0760 0.0102 0.1250 0.1298
## Baseline_Age 1.3024 0.0682 0.1875 0.7927
## `as.factor(female0_male1)`0 . 0.1250 0.1250 1.1547
## `as.factor(female0_male1)`1 . 0.1250 0.1250 1.1547
## PSPRSTOT 0.8474 0.0601 0.2500 0.9686
##
## Sample Sizes:
## Control Treated
## All 109 16
## Matched 16 16
## Unmatched 93 0
## Discarded 0 0
Table below shows output from Matchit Package The formula is: group ~ age + sex (as a factor) +PSPRS The “distance variable” is the propensity score. We had to drop ~40 controls because they did not have PSPRSs
summary(m.out.nearest)
##
## Call:
## matchit(formula = fmlaMatching, data = df.peter.matchit, method = "nearest",
## link = "logit")
##
## Summary of Balance for All Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1179 0.5550
## Baseline_Age 64.6250 68.5505 -0.3859
## `as.factor(female0_male1)`0 0.7500 0.5229 0.5244
## `as.factor(female0_male1)`1 0.2500 0.4771 -0.5244
## PSPRSTOT 34.6875 30.1284 0.3020
## Var. Ratio eCDF Mean eCDF Max
## distance 3.3792 0.1978 0.3888
## Baseline_Age 1.6824 0.1008 0.3022
## `as.factor(female0_male1)`0 . 0.2271 0.2271
## `as.factor(female0_male1)`1 . 0.2271 0.2271
## PSPRSTOT 1.2210 0.0806 0.2563
##
## Summary of Balance for Matched Data:
## Means Treated Means Control Std. Mean Diff.
## distance 0.1967 0.1789 0.1250
## Baseline_Age 64.6250 64.6875 -0.0061
## `as.factor(female0_male1)`0 0.7500 0.6250 0.2887
## `as.factor(female0_male1)`1 0.2500 0.3750 -0.2887
## PSPRSTOT 34.6875 36.3125 -0.1076
## Var. Ratio eCDF Mean eCDF Max Std. Pair Dist.
## distance 2.0760 0.0102 0.1250 0.1298
## Baseline_Age 1.3024 0.0682 0.1875 0.7804
## `as.factor(female0_male1)`0 . 0.1250 0.1250 1.1547
## `as.factor(female0_male1)`1 . 0.1250 0.1250 1.1547
## PSPRSTOT 0.8474 0.0601 0.2500 0.9272
##
## Sample Sizes:
## Control Treated
## All 109 16
## Matched 16 16
## Unmatched 93 0
## Discarded 0 0
Comparison of propensity scores between groups. Note the outlier in the treatment group
plot(m.out.nearest, type = "jitter", interactive = FALSE)
Density Plots Black line = cases, gray line = controls Left graph is full dataset, right graph is matched dataset To me the matching is better, but it’s not perfect.
fmlaMatching <- as.formula("Rockit_1_4RNTNI_0~Baseline_Age+female0_male1+PSPRSTOT")
m.out.nearest <- matchit(fmlaMatching, method = "nearest",
data = df.peter.matchit, link = "logit")
plot(m.out.nearest, type = "density", interactive = FALSE,
which.xs = ~Baseline_Age + female0_male1 + PSPRSTOT)