I am analyzing data for a case control study looking at association of use of drug 'ACE1mo' and Pneumonia. I would like to match cases with controls at the time of their admission on age, gender and CCI and look at their exposure to 'ACE1mo' going back in time.

I am used to match 'treated patients' with 'untreated patients' using psmatch2 command and looking at the incidence of disease in a retrospective or prospective study design but not matching 'case patients' with 'control patients'. It would be great help if someone can provide any insight as to whether syntax below makes any sense or not.

I will present the syntax i used for this study vs what i usually use for a retrospective/prospective study in which patients are rather matched on treatment status.

1) Create ps score using logistic regression: logistic Pneumonia Age Gender CCI
(For a prospective/retrospective study i usually use logistic ACE1mo Age Gender CCI for looking at the probablity of an individual falling into the treatment arm vs untreated arm).

2) Matching Process with replacement: psmatch2 Penumonia, pscore(pscore) n(2) cal(0.20).
(For a prospective/retrospective study i usually use psmatch2 ACE1mo, pscore(pscore) n(2) cal(0.20).

3) Effect Estimation: psmatch2 Pneumonia Age Gender CCI, outcome(ACE1mo) logit.
(For a prospective/retrospective study i usually use psmatch2 ACE1mo Age Gender CCI, outcome(Pneumonia) logit)

Thanks!
Anindit Chhibber

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long MRN byte Gender double Age byte(CCI Pneumonia ACE1mo)
 2949 0 70.579055  5 0 0
 2949 0 70.584531  5 0 0
 2949 0 70.587269  5 0 0
 2949 0 70.590007  5 0 0
 2972 1 74.360027  2 0 1
 2972 1 74.932238  3 0 0
 3897 1 69.021218  9 0 0
 3897 1 69.023956  9 0 0
 3897 1 69.631759 11 0 0
 3921 0 66.184805  2 0 0
 3921 0 69.420945  2 0 0
 3921 0 69.423682  2 0 0
 3921 0 69.437372  2 0 0
 6783 1     65.22 10 0 0
 6783 1     65.26 10 0 0
 6783 1     65.28 10 0 0
 6783 1     65.33 10 0 0
 6783 1     65.44 10 0 0
 6783 1     65.74 10 0 0
 6783 1     65.77 10 0 0
 6783 1     65.91 10 0 0
 9776 1 74.220397  2 0 0
 9776 1 74.223135  2 0 0
 9776 1 74.225873  2 0 0
 9776 1 74.228611  2 0 0
 9776 1 74.231348  2 0 0
 9776 1 74.234086  2 0 0
 9776 1 74.247775  2 0 0
 9776 1 74.250513  2 0 0
 9776 1 74.253251  2 0 0
10173 0     85.37  7 0 0
10173 0 86.384668  7 0 0
10173 0 86.436687  7 0 0
10173 0 86.603696  7 0 0
10173 0 87.460643  7 0 0
10173 0  87.59206  7 0 0
10173 0 88.591376  7 0 0
10173 0 89.059548 10 0 0
10173 0 89.062286 10 0 0
10173 0 89.065024 10 0 0
10173 0 89.067762 10 0 0
14837 1  71.12115  0 0 1
15107 1 67.069131  4 1 0
15107 1 68.147844  5 0 0
25692 1 67.665982  9 0 0
25692 1 67.674196  9 0 0
25692 1 67.685147  9 0 0
25940 0     93.57  3 0 0
25940 0 97.711157  3 0 0
25940 0 97.716632  3 0 0
26161 0 68.670773  5 0 0
26161 0 68.673511  5 0 1
26278 1 68.290212  2 0 0
32086 1 80.657084  4 0 0
32706 0     65.44  4 0 0
32706 0 68.588638  4 0 0
32946 0 84.180698  . 0 0
32946 0 84.183436  2 0 0
32946 0 84.186174  2 0 1
32946 0 84.188912  2 0 1
32946 0  84.19165  2 0 1
32946 0 84.194387  2 0 1
32946 0 84.199863  2 0 1
33100 1 67.512663  3 0 0
33100 1 67.512663  3 1 0
33100 1 67.627652  3 0 0
33100 1  67.63039  4 0 0
33100 1 67.633128  4 0 0
33100 1 67.635866  4 0 0
33100 1 67.638604  4 0 0
33100 1 67.641342  4 0 0
33100 1 67.644079  4 0 0
33100 1 67.646817  4 0 0
33100 1 67.649555  4 0 0
33100 1 67.655031  4 0 0
33100 1 67.657769  4 0 0
33100 1 67.660507  4 0 0
33100 1 67.663244  4 0 0
33100 1 67.665982  4 0 0
33100 1  67.66872  4 0 0
33100 1 67.671458  4 0 0
33100 1 67.674196  4 0 0
33100 1 67.676934  4 0 0
33100 1 67.685147  4 0 0
33100 1 67.687885  4 0 0
33100 1 67.698836  4 0 0
33589 1 67.353867  . 0 0
33589 1 67.356605  7 0 0
33589 1 67.359343  7 0 1
33589 1 67.362081  7 0 1
36426 0      88.2  4 0 0
36426 0     88.41  4 0 0
36426 0     88.42  4 0 0
39875 1     69.85  5 0 0
43067 0 75.014374  . 0 0
43067 0 75.017112  5 0 0
43216 1 80.065708  1 0 0
44859 0 77.114305  2 0 0
44859 0 77.117043  2 0 0
47134 0 66.086242  0 0 0
end