Hi,
I am currently using the Stata dtalink-package in order to match data from two sources. As I created dummies, it makes sense for me to use the if-condition in order to optimize the merging process. In particular, I made assumptions for some variables and I would like to adapt the matching process based on whether assumptions are included or not.
Therefore, in one round of matching, I'd like to implement several different weights and also different matching variables, based on the value of different dummy variables. Is there a way to optimize accounting for such dummy variables in dtalink, so that I do not need to run the whole dtalink-code several times within one round of matching?
I am using the following code in which I aim at changing weights and including less variables if I made an assumption (note: this assumption is only made in the dataset with source = 0):
************************************************** *********************************************
** First condition
version 15
#delimit ;
[...]
matdtnum 2 -1 matm 2 -2 maty_min 2 -3
isdtnum 2 -1 issuem 3 -1 issuey_min 3 -4
if assump_isdt == 0 & assump_matdt == 0,
cutoff(20) source(source) block(iso3) calcweights;
#delimit cr
** Second condition
version 15
#delimit ;
[...]
maty_min 6 -3
issuey 7 -4
if source == 0 & (assump_isdt == 1 | assump_matdt == 1) & _matchflag == 0
| source == 1 & _matchflag == 0,
cutoff(20) source(source) block(iso3) calcweights;
#delimit cr
************************************************** *********************************************
Thanks for your help!
Best,
Milena
0 Response to Dtalink: Coditioning probability matching
Post a Comment