Sorry for that. The differences are in red. Here it is code and output:
Call:matchit(formula = LES ~ Modalidade.DP.Inicial + Age + BMI +
Education.dic.4y + Davies.Score + DM + Hypertension + Gender + Race +
Incomes.dic + Bienium + time.of.predialysis.care, data = Lupus, method =
"nearest", discard = "both", caliper = 0.2, ratio = 5)
Summary of balance for all data:
Means Treated Means Control SD Control Mean Diff eQQ Med eQQ Mean eQQ
Maxdistance 0.2158 0.0148 0.0485
0.2010 0.1386 0.1956 0.5376Modalidade.DP.Inicial 0.4040 0.4642
0.4988 -0.0602 0.0000 0.0606 1.0000Age
43.6899 59.5407 15.7876 -15.8509 18.9000 15.8586 21.6000BMI
22.8242 24.7304 4.6462 -1.9062
2.1000 2.1020 12.3000Education.dic.4y 0.5960 0.3456
0.4756 0.2503 0.0000 0.2525 1.0000Davies.Score
1.3030 0.9258 0.8834 0.3773 0.0000 0.4242 1.0000DM
0.0808 0.4501 0.4976 -0.3693 0.0000
0.3737 1.0000Hypertension 0.7172 0.7606 0.4268
-0.0434 0.0000 0.0404 1.0000Gender !
0.1717 0.4829 0.4998 -0.3112 0.0000 0.3131 1.0000Race
1.9192 1.8253 1.1466 0.0939
0.0000 0.1212 2.0000Incomes.dic 0.6667 0.6629
0.4728 0.0037 0.0000 0.0101 1.0000Bienium
2.1717 2.0908 0.7741 0.0809 0.0000 0.0808
1.0000time.of.predialysis.care 30.5758 17.1882 29.6989 13.3875
12.0000 12.9596 48.0000
Summary of balance for matched data: Means
Treated Means Control SD Control Mean Diff eQQ Med eQQ Mean eQQ Maxdistance
0.1876 0.1851 0.1685 0.0025 0.051
0.0682 0.18Modalidade.DP.Inicial 0.4130 0.4330 0.4962
-0.0199 0.000 0.0000 0.00Age
44.8935 45.4722 17.1983 -0.5788 4.000 3.6543 7.90BMI
23.0283 22.8350 4.1923 0.1933
0.400 0.4783 5.20Education.dic.4y 0.5652 0.5328
0.4997 0.0324 0.000 0.0543 1.00Davies.Score
1.3152 1.3426 1.0048 -0.0274 0.000 0.4457 1.00DM
0.0870 0.1000 0.3004 -0.0130
0.000 0.0217 1.00Hypertension 0.7283 0.6783
0.4678 0.0500 0.000 0.0217 !
1.00Gender 0.1848 0.2103 0.4081
-0.0255 0.000 0.0543 1.00Race
1.9348 1.9205 1.1722 0.0143 0.000 0.0652 1.00Incomes.dic
0.6413 0.6612 0.4740 -0.0199 0.000
0.0217 1.00Bienium 2.1413 2.0899
0.7672 0.0514 0.000 0.0543 1.00time.of.predialysis.care 28.0761
28.1089 41.3088 -0.0328 3.000 5.3043 33.00
Percent Balance Improvement: Mean
Diff. eQQ Med eQQ Mean eQQ Maxdistance 98.7597
63.1956 65.1547 66.5189Modalidade.DP.Inicial 66.8853 0.0000 100.0000
100.0000Age 96.3487 78.8360 76.9567
63.4259BMI 89.8604 80.9524 77.2476
57.7236Education.dic.4y 87.0455 0.0000 78.4783
0.0000Davies.Score 92.7490 0.0000 -5.0466 0.0000DM
96.4683 0.0000 94.1833 0.0000Hypertension
-15.2295 0.0000 46.1957 0.0000Gender
91.7907 0.0000 82.6438 0.0000Race
84.7613 0.0000 46.1957 50.0000Incomes.dic -432.3692
0.0000 -115.2174 0.0000Bienium 36.4268 0.0000
32.7446 0.0000time.of.predialysis.care 99.7551 75.0000 59.0701!
31.2500
Sample sizes: Control TreatedAll
5254 99Matched 340 92Unmatched 3111
6Discarded 1803 1
And when running a t-test:
> t.test (Age~LES) #LES is the variable with the control and treated groups.
Welch Two Sample t-test
data: Age by LESt = 1.3396, df = 148.617, p-value = 0.1824alternative
hypothesis: true difference in means is not equal to 095 percent confidence
interval: -1.228034 6.396959sample estimates:mean in group 0 mean in group 1
47.47794 44.89348 # In the Summary of balance for matched data it
shows 44.8935 and 45.4722 respectively
Sincerely,
Thyago
> Date: Sat, 28 Dec 2013 13:29:48 +0100
> From: [email protected]
> To: [email protected]; [email protected]
> Subject: Re: [R] Matchit
>
>
>
> On 27.12.2013 21:17, Thyago Moraes wrote:
> > Dear Friends,
> > I'm using Matchit package for a Cohor Study.
> > After match the number provided by the summary output apparently don't
> > correspond to the true value:
> > Here the values provided by summary:>summary (test) Summary of Balance for
> > Matched Data Age: Means treated 44.89; Means control 45.47
> > However, after applying a test (for instance) I get:
> >> mean in group control: 47.47 and for treated group: 44.89
> > Why the means differ between this 2 functions (summary and t-test)? Am I
> > missing anything about the means generated by the summary command after
> > match?There is no missing data.
> > Thank you in advance for your help and patience.
>
> Please provide the code and a toy example so that we know what you
> actually did. Otherwise it is hard to help.
>
> Best,
> Uwe Ligges
>
>
> > Thyago
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [email protected] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.