Dear all,
I have encountered a problem when using propensity score matching to match observations in the concurrent year with observations in the previous year.
I have tried the following code:
psmatch2 X_main control_1 control_2 if year==1981, out(Y) common
(X_main is the key explanatory variables, Y is the outcome variable, the rest are control variables)
I thought the year specification would match all observations in the data-set with observations in the year 1981, but it turns out that observations in other years are also included in the _id column.
I have also tried this code:
psmatch2 X_main control_1 control_2 in 1/500, out(Y) common
I thought the in 1/500 would match all observations with the 1st to 500th observations in the data-set, but it turns out that only the first 500 observations are matched with each other.
Could anyone kindly teach me how to match all observations in the data-set (whole sample) with observations in a given year (or a given range)/ subsample?
Thank you so much!
Related Posts with Match observations in the concurrent year with observations in the previous year
Looping in Stata to extract values from one file to anotherHi all! So I am a bit stuck on something I have to do. 1. I have a dataset which is multi level, an…
No observations r(2000) with Regress and SEMHello all. I am working with a dataset that contains many categorical variables with values that are…
Creating first-order difference variables in repeated cross-sectional (i.e. pseudo panel) dataGreetings, I'm running Stata 15.1 on OSX. I've created a repeated cross-sectional dataset to assess…
Quick questions about the interaction methodsDear Researchers, Greetings, I have quick questions about interaction variables, please. At first,…
One-sided test of coefficients obtained by mixedDear all, I ran mixed 'outcome' 'treatment' 'binary_covariates' 'metric_covaraites' [fweight=w] || b…
Subscribe to:
Post Comments (Atom)
0 Response to Match observations in the concurrent year with observations in the previous year
Post a Comment