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
Related Posts with Dtalink: Coditioning probability matching
Chained Imputation - Auxiliary variablesHello I'm trying to do MICE imputation in Stata. I have 17 variables in the analysis model and I h…
What kinds of advantages we may have for the integrated use of Stata with DBMS (such as SQL Server)?What kinds of advantages we may have for the integrated use of Stata with DBMS? Any advantages for …
Cumulative sums in descending order within groupsHello Statalisters, I'm using Stata 16.1, and I have panel data in which the unit of observation is…
Stata regression output failHey Stata community, I just ran a few regressions and was wondering why Stata isn't telling me all …
Suest CommandThe following is from Suest help file Example 2: Do coefficients vary between groups? ("Chow test")…
Subscribe to:
Post Comments (Atom)
0 Response to Dtalink: Coditioning probability matching
Post a Comment