-
Notifications
You must be signed in to change notification settings - Fork 2
/
psweight_example_R.log
572 lines (527 loc) · 28.5 KB
/
psweight_example_R.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
----------------------------------------------------------------------------------------------------------------------------------------------------------------
name: psweight_example_R
log: C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\psweight_example_R.log
log type: text
opened on: 12 Mar 2019, 15:33:18
.
. fvrevar `varlist'
. tempfile csvout
. export delimited `treatvar' `r(varlist)' `wgtvar' using "C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\testfile.csv" if `tousevar', replace nolabel
(note: file C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\testfile.csv not found)
file C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\testfile.csv saved
.
. rsource, terminator(END_OF_R) lsource
Assumed R program path: "C:\Program Files\Microsoft\R Open\R-3.5.1\bin\x64\Rscript.exe"
Beginning of listing of R source code
mydata <- read.csv("C:\\Users\\kkranker\\Documents\\Stata\\Ado\\Devel\\gmatch\\testfile.csv", stringsAsFactors = F);
library(CBPS);
summary(mydata);
fit_ATE <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 0, method='exact', stand
> ardize=TRUE);
summary(fit_ATE);
print( fit_ATE$weights[1:10]);
balance(fit_ATE);
fit_ATE_over <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 0, method="over", standa
> rdize=TRUE);
summary(fit_ATE_over);
print( fit_ATE_over$weights[1:10]);
balance(fit_ATE_over);
fit_ATET <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 1, method="exact", stand
> ardize=TRUE);
summary(fit_ATET);
print( fit_ATET$weights[1:10]);
balance(fit_ATET);
fit_ATET_over <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 1, method="over", standa
> rdize=TRUE);
summary(fit_ATET_over);
print( fit_ATET_over$weights[1:10]);
balance(fit_ATET_over);
W_fit_ATE <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 0, method='exact', stand
> ardize=TRUE, sample.weights=mydata$wgt);
summary(W_fit_ATE);
print( W_fit_ATE$weights[1:10]);
balance(W_fit_ATE);
W_fit_ATE_over <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 0, method="over", standa
> rdize=TRUE, sample.weights=mydata$wgt);
summary(W_fit_ATE_over);
print( W_fit_ATE_over$weights[1:10]);
balance(W_fit_ATE_over);
W_fit_ATET <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 1, method="exact", stand
> ardize=TRUE, sample.weights=mydata$wgt);
summary(W_fit_ATET);
print( W_fit_ATET$weights[1:10]);
balance(W_fit_ATET);
W_fit_ATET_over <- CBPS(treat ~ x1 + x1 + X__000000 + X__000001 +x4 + x5 + x6 +x7 +x90 +x91+ x92 +x93 +x94+ x95, data = mydata, ATT = 1, method="over", standa
> rdize=TRUE, sample.weights=mydata$wgt);
summary(W_fit_ATET_over);
print( W_fit_ATET_over$weights[1:10]);
balance(W_fit_ATET_over);
q();
End of listing of R source code
Beginning of R output
treat x1 X__000000 X__000001 X__000002
Min. :0.000 Min. :0.000 Min. :0 Min. :0.000 Min. :0
1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0 1st Qu.:0.000 1st Qu.:0
Median :0.000 Median :1.000 Median :0 Median :0.000 Median :0
Mean :0.184 Mean :0.698 Mean :0 Mean :0.024 Mean :0
3rd Qu.:0.000 3rd Qu.:1.000 3rd Qu.:0 3rd Qu.:0.000 3rd Qu.:0
Max. :1.000 Max. :1.000 Max. :0 Max. :1.000 Max. :0
X__000003 x4 x5 x6
Min. :0.00 Min. :0.000 Min. :14.00 Min. : 7.00
1st Qu.:0.00 1st Qu.:0.000 1st Qu.:22.00 1st Qu.:12.00
Median :0.00 Median :0.000 Median :26.00 Median :12.00
Mean :0.04 Mean :0.484 Mean :26.37 Mean :12.92
3rd Qu.:0.00 3rd Qu.:1.000 3rd Qu.:30.00 3rd Qu.:15.00
Max. :1.00 Max. :1.000 Max. :44.00 Max. :17.00
x7 x90 x91 x92
Min. : 1.000 Min. :-4.10737 Min. :-2.84132 Min. :-3.44901
1st Qu.: 4.000 1st Qu.:-0.69920 1st Qu.:-0.70215 1st Qu.:-0.71419
Median : 7.000 Median :-0.05381 Median :-0.05541 Median :-0.01172
Mean : 6.726 Mean :-0.02170 Mean :-0.02270 Mean :-0.01024
3rd Qu.: 9.000 3rd Qu.: 0.62365 3rd Qu.: 0.72666 3rd Qu.: 0.64116
Max. :12.000 Max. : 2.82700 Max. : 3.19300 Max. : 2.76036
x93 x94 x95 wgt
Min. :-4.27425 Min. :-3.16616 Min. :-2.85797 Min. :0.8767
1st Qu.:-0.56423 1st Qu.:-0.68834 1st Qu.:-0.76920 1st Qu.:1.6879
Median : 0.03288 Median : 0.02031 Median :-0.04100 Median :1.9667
Mean : 0.04888 Mean :-0.01080 Mean :-0.06857 Mean :1.9651
3rd Qu.: 0.69102 3rd Qu.: 0.63909 3rd Qu.: 0.60415 3rd Qu.:2.2325
Max. : 3.77797 Max. : 2.79488 Max. : 2.66855 Max. :3.2366
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 0, standardize = TRUE, method = "exact")
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.1 1 3.09 0.00202 **
x1 -1.41 0.174 -8.12 4.44e-16 ***
X__000001 -2.5 0.138 -18.1 0.000 ***
x4 -0.242 0.148 -1.63 0.103
x5 0.0734 0.196 0.374 0.708
x6 -0.489 0.184 -2.66 0.00776 **
x7 0.0694 0.145 0.479 0.632
x90 0.0188 0.165 0.114 0.909
x91 0.00349 0.161 0.0216 0.983
x92 0.212 0.173 1.23 0.221
x93 -0.0175 0.131 -0.134 0.893
x94 -0.354 0.131 -2.71 0.00675 **
x95 -0.00731 0.15 -0.0486 0.961
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.1186299
Log-Likelihood: -219.3911
[1] 0.002045887 0.004633935 0.002533138 0.002014880 0.001991983 0.002613456
[7] 0.002304200 0.002258893 0.002129910 0.002024164
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.6769971089 0.676988149 1.4730615780 1.473042082
X__000001 0.0223569009 0.022358318 0.1459305917 0.145939840
x4 0.4847206229 0.484719065 0.9689675579 0.968964443
x5 26.2662942090 26.266166196 4.5227932513 4.522771209
x6 12.6384633774 12.638325541 5.6760784062 5.676016502
x7 6.7376154944 6.737691119 2.0127684058 2.012790998
x90 -0.0636667434 -0.063674150 -0.0647160419 -0.064723571
x91 0.0168123457 0.016836868 0.0169139064 0.016938577
x92 0.0002553561 0.000259296 0.0002517439 0.000255628
x93 0.0415649449 0.041540415 0.0424548752 0.042429821
x94 -0.0798634260 -0.079877113 -0.0814147892 -0.081428742
x95 -0.0819014590 -0.081896455 -0.0829545872 -0.082949519
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 0, standardize = TRUE, method = "over")
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.14 0.795 1.44 0.151
x1 -1.03 0.106 -9.73 0.000 ***
X__000001 -1.94 0.117 -16.5 0.000 ***
x4 -0.236 0.129 -1.84 0.0663 .
x5 0.0451 0.148 0.304 0.761
x6 -0.239 0.124 -1.92 0.0544 .
x7 0.00565 0.136 0.0415 0.967
x90 0.114 0.115 0.991 0.321
x91 -0.145 0.118 -1.23 0.219
x92 0.127 0.124 1.02 0.307
x93 0.0904 0.115 0.786 0.432
x94 -0.174 0.13 -1.33 0.182
x95 0.0231 0.113 0.204 0.838
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.01757488
Log-Likelihood: -212.4078
[1] 0.002198053 0.003742019 0.002539764 0.002239494 0.002157846 0.003185565
[7] 0.002365665 0.002450448 0.002311267 0.002307549
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.704150014 0.63311251 1.532142926 1.37757415
X__000001 0.023263575 0.01965795 0.151848744 0.12831365
x4 0.485752036 0.48394087 0.971029375 0.96740882
x5 26.349086987 25.80166504 4.537049340 4.44278875
x6 12.912355186 12.30749349 5.799086349 5.52743604
x7 6.665719241 6.91138124 1.991290406 2.06467849
x90 -0.027144431 -0.05600462 -0.027591801 -0.05692764
x91 -0.023952127 0.01901111 -0.024096818 0.01912595
x92 -0.006962683 0.01366417 -0.006864189 0.01347088
x93 0.055441566 0.02000865 0.056628603 0.02043704
x94 -0.022983864 -0.11351896 -0.023430331 -0.11572409
x95 -0.069880378 -0.10071912 -0.070778934 -0.10201421
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
[1] "Finding ATT with T=1 as the treatment. Set ATT=2 to find ATT with T=0 as the treatment"
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 1, standardize = TRUE, method = "exact")
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.729 0.949 0.768 0.443
x1 -1.35 0.133 -10.2 0.000 ***
X__000001 -1.78 0.147 -12.1 0.000 ***
x4 -0.306 0.151 -2.02 0.0433 *
x5 0.0589 0.184 0.321 0.748
x6 -0.241 0.159 -1.51 0.13
x7 0.0342 0.175 0.195 0.845
x90 0.158 0.147 1.07 0.285
x91 -0.158 0.14 -1.12 0.262
x92 0.13 0.144 0.901 0.368
x93 0.0615 0.156 0.395 0.693
x94 -0.123 0.148 -0.834 0.404
x95 0.00166 0.154 0.0108 0.991
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.0003900124
Log-Likelihood: -211.9137
[1] 0.0011490296 0.0096455375 0.0021884911 0.0011663534 0.0006586359
[6] 0.0063956569 0.0020534887 0.0019413452 0.0013744323 0.0016813901
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.46740829 0.46739130 1.01702236 1.01698540
X__000001 0.01087820 0.01086957 0.07100544 0.07094910
x4 0.43478859 0.43478261 0.86915228 0.86914033
x5 25.46745728 25.46739130 4.38524152 4.38523016
x6 11.86965117 11.86956522 5.33079606 5.33075745
x7 6.85868585 6.85869565 2.04893648 2.04893941
x90 0.09719174 0.09720244 0.09879357 0.09880444
x91 -0.08900505 -0.08901568 -0.08954272 -0.08955341
x92 0.04536989 0.04537868 0.04472809 0.04473676
x93 0.08656615 0.08656867 0.08841958 0.08842216
x94 -0.12991651 -0.12991726 -0.13244016 -0.13244093
x95 -0.08072627 -0.08072509 -0.08176428 -0.08176309
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
[1] "Finding ATT with T=1 as the treatment. Set ATT=2 to find ATT with T=0 as the treatment"
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 1, standardize = TRUE, method = "over")
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.729 0.946 0.77 0.441
x1 -1.35 0.132 -10.2 0.000 ***
X__000001 -1.78 0.147 -12.2 0.000 ***
x4 -0.306 0.15 -2.03 0.042 *
x5 0.0589 0.182 0.323 0.747
x6 -0.241 0.158 -1.52 0.128
x7 0.0342 0.173 0.197 0.844
x90 0.158 0.146 1.08 0.282
x91 -0.158 0.14 -1.13 0.26
x92 0.13 0.143 0.906 0.365
x93 0.0615 0.153 0.401 0.688
x94 -0.123 0.147 -0.838 0.402
x95 0.00166 0.152 0.0109 0.991
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.0003900124
Log-Likelihood: -211.9137
[1] 0.0011490296 0.0096455375 0.0021884911 0.0011663534 0.0006586359
[6] 0.0063956569 0.0020534887 0.0019413452 0.0013744323 0.0016813901
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.46740829 0.46739130 1.01702236 1.01698540
X__000001 0.01087820 0.01086957 0.07100544 0.07094910
x4 0.43478859 0.43478261 0.86915228 0.86914033
x5 25.46745728 25.46739130 4.38524152 4.38523016
x6 11.86965117 11.86956522 5.33079606 5.33075745
x7 6.85868585 6.85869565 2.04893648 2.04893941
x90 0.09719174 0.09720244 0.09879357 0.09880444
x91 -0.08900505 -0.08901568 -0.08954272 -0.08955341
x92 0.04536989 0.04537868 0.04472809 0.04473676
x93 0.08656615 0.08656867 0.08841958 0.08842216
x94 -0.12991651 -0.12991726 -0.13244016 -0.13244093
x95 -0.08072627 -0.08072509 -0.08176428 -0.08176309
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 0, standardize = TRUE, method = "exact", sample.weights = mydata$wgt)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.05 0.999 3.06 0.00222 **
x1 -1.48 0.174 -8.51 0.000 ***
X__000001 -2.49 0.138 -18.1 0.000 ***
x4 -0.331 0.152 -2.18 0.029 *
x5 0.0765 0.198 0.386 0.699
x6 -0.49 0.185 -2.65 0.00804 **
x7 0.0753 0.147 0.513 0.608
x90 0.0136 0.168 0.0811 0.935
x91 0.0483 0.163 0.297 0.766
x92 0.223 0.176 1.27 0.206
x93 -0.0374 0.13 -0.288 0.773
x94 -0.329 0.13 -2.53 0.0115 *
x95 -0.0417 0.15 -0.277 0.782
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.1079513
Log-Likelihood: -217.342
[1] 0.002471836 0.005039769 0.002853681 0.001818577 0.001338932 0.002637366
[7] 0.003323281 0.001691104 0.002473125 0.002277368
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.670990365 0.670958232 1.459991649 1.459921733
X__000001 0.022448750 0.022453516 0.146530116 0.146561228
x4 0.484085296 0.484078659 0.967697525 0.967684257
x5 26.184229053 26.184046591 4.508662452 4.508631034
x6 12.637678352 12.637429722 5.675725842 5.675614179
x7 6.765226000 6.765293979 2.021016658 2.021036966
x90 -0.055438681 -0.055436080 -0.056352372 -0.056349728
x91 0.020517908 0.020577663 0.020641853 0.020701969
x92 0.001383109 0.001407022 0.001363544 0.001387119
x93 0.043417410 0.043384642 0.044347002 0.044313534
x94 -0.086122721 -0.086156234 -0.087795673 -0.087829836
x95 -0.086089395 -0.086091977 -0.087196373 -0.087198989
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 0, standardize = TRUE, method = "over", sample.weights = mydata$wgt)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.19 0.823 1.44 0.149
x1 -1.09 0.11 -9.92 0.000 ***
X__000001 -1.89 0.124 -15.3 0.000 ***
x4 -0.309 0.13 -2.38 0.0175 *
x5 0.0473 0.149 0.317 0.751
x6 -0.246 0.125 -1.97 0.0492 *
x7 0.00998 0.138 0.0724 0.942
x90 0.108 0.119 0.911 0.362
x91 -0.122 0.118 -1.03 0.303
x92 0.135 0.124 1.09 0.275
x93 0.0991 0.114 0.871 0.384
x94 -0.155 0.133 -1.16 0.244
x95 0.00614 0.115 0.0533 0.958
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.01658995
Log-Likelihood: -210.4043
[1] 0.002654934 0.004199993 0.002873667 0.002023763 0.001450071 0.003258144
[7] 0.003417935 0.001840457 0.002680631 0.002598970
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.699122195 0.627432499 1.521203015 1.365215147
X__000001 0.023476273 0.019144114 0.153237090 0.124959711
x4 0.485316436 0.478919510 0.970158602 0.957371002
x5 26.274562865 25.800829349 4.524217031 4.442644856
x6 12.901882664 12.322596234 5.794383020 5.534218860
x7 6.694740874 6.954440362 1.999960213 2.077541803
x90 -0.019405291 -0.053678384 -0.019725111 -0.054563063
x91 -0.019957717 0.036135440 -0.020078279 0.036353729
x92 -0.007947899 0.017687420 -0.007835469 0.017437215
x93 0.061421448 0.008327584 0.062736518 0.008505883
x94 -0.031328612 -0.116214761 -0.031937177 -0.118472256
x95 -0.073622532 -0.112042159 -0.074569206 -0.113482850
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
[1] "Finding ATT with T=1 as the treatment. Set ATT=2 to find ATT with T=0 as the treatment"
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 1, standardize = TRUE, method = "exact", sample.weights = mydata$wgt)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.577 0.962 0.6 0.548
x1 -1.46 0.134 -10.9 0.000 ***
X__000001 -1.76 0.152 -11.6 0.000 ***
x4 -0.372 0.159 -2.33 0.0196 *
x5 0.0637 0.181 0.353 0.724
x6 -0.24 0.163 -1.48 0.139
x7 0.0478 0.179 0.266 0.79
x90 0.134 0.149 0.895 0.371
x91 -0.13 0.145 -0.897 0.37
x92 0.145 0.146 0.99 0.322
x93 0.0791 0.163 0.487 0.626
x94 -0.106 0.15 -0.703 0.482
x95 -0.0461 0.162 -0.285 0.776
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.0004245075
Log-Likelihood: -209.9155
[1] 0.0013742185 0.0101473251 0.0023303688 0.0009936416 0.0003863278
[6] 0.0059341280 0.0032909050 0.0014927431 0.0013896863 0.0019035834
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.45130812 0.45122315 0.98199038 0.98180549
X__000001 0.01142030 0.01140386 0.07454391 0.07443663
x4 0.42191945 0.42188610 0.84342658 0.84335992
x5 25.44726603 25.44698565 4.38176479 4.38171651
x6 11.84802960 11.84757051 5.32108556 5.32087938
x7 7.01527640 7.01542161 2.09571572 2.09575910
x90 0.08392905 0.08397382 0.08531229 0.08535781
x91 -0.06482825 -0.06488372 -0.06521986 -0.06527567
x92 0.05749190 0.05753875 0.05667862 0.05672482
x93 0.10163144 0.10165232 0.10380743 0.10382876
x94 -0.12522921 -0.12522646 -0.12766182 -0.12765901
x95 -0.10441932 -0.10446494 -0.10576199 -0.10580820
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
[1] "Finding ATT with T=1 as the treatment. Set ATT=2 to find ATT with T=0 as the treatment"
Call:
CBPS(formula = treat ~ x1 + x1 + X__000000 + X__000001 + x4 +
x5 + x6 + x7 + x90 + x91 + x92 + x93 + x94 + x95, data = mydata,
ATT = 1, standardize = TRUE, method = "over", sample.weights = mydata$wgt)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.577 0.959 0.602 0.547
x1 -1.46 0.133 -10.9 0.000 ***
X__000001 -1.76 0.151 -11.7 0.000 ***
x4 -0.372 0.158 -2.35 0.0187 *
x5 0.0637 0.18 0.355 0.723
x6 -0.24 0.162 -1.49 0.137
x7 0.0478 0.177 0.269 0.788
x90 0.134 0.149 0.9 0.368
x91 -0.13 0.145 -0.901 0.368
x92 0.145 0.146 0.996 0.319
x93 0.0791 0.16 0.495 0.621
x94 -0.106 0.149 -0.707 0.479
x95 -0.0461 0.159 -0.289 0.772
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
J - statistic: 0.0004245075
Log-Likelihood: -209.9155
[1] 0.0013742185 0.0101473251 0.0023303688 0.0009936416 0.0003863278
[6] 0.0059341280 0.0032909050 0.0014927431 0.0013896863 0.0019035834
$balanced
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.45130812 0.45122315 0.98199038 0.98180549
X__000001 0.01142030 0.01140386 0.07454391 0.07443663
x4 0.42191945 0.42188610 0.84342658 0.84335992
x5 25.44726603 25.44698565 4.38176479 4.38171651
x6 11.84802960 11.84757051 5.32108556 5.32087938
x7 7.01527640 7.01542161 2.09571572 2.09575910
x90 0.08392905 0.08397382 0.08531229 0.08535781
x91 -0.06482825 -0.06488372 -0.06521986 -0.06527567
x92 0.05749190 0.05753875 0.05667862 0.05672482
x93 0.10163144 0.10165232 0.10380743 0.10382876
x94 -0.12522921 -0.12522646 -0.12766182 -0.12765901
x95 -0.10441932 -0.10446494 -0.10576199 -0.10580820
$original
0.mean 1.mean 0.std.mean 1.std.mean
x1 0.750000000 0.46739130 1.631906797 1.01698540
X__000001 0.026960784 0.01086957 0.175981600 0.07094910
x4 0.495098039 0.43478261 0.989712249 0.86914033
x5 26.568627451 25.46739130 4.574852013 4.38523016
x6 13.159313725 11.86956522 5.909998253 5.33075745
x7 6.696078431 6.85869565 2.000359789 2.04893941
x90 -0.048508020 0.09720244 -0.049307486 0.09880444
x91 -0.007743354 -0.08901568 -0.007790131 -0.08955341
x92 -0.022780135 0.04537868 -0.022457889 0.04473676
x93 0.040385344 0.08656867 0.041250019 0.08842216
x94 0.016055935 -0.12991726 0.016367825 -0.13244093
x95 -0.065828219 -0.08072509 -0.066674669 -0.08176309
End of R output
. erase "C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\testfile.csv"
.
.
. log close psweight_example_R
name: psweight_example_R
log: C:\Users\kkranker\Documents\Stata\Ado\Devel\gmatch\psweight_example_R.log
log type: text
closed on: 12 Mar 2019, 15:33:23
----------------------------------------------------------------------------------------------------------------------------------------------------------------