I have received an example of comparability score analysis for SAS (see example below) and I need to reanalyze my data using this method. However, I am using Stata, version 12.0 for Mac, and I have never used weights, this new score method or SAS before. I have a simple logistic regression model, which I should weight by the comparability score (derived by certain criteria described in Vintzileos et al. The use of a comparability scoring system in reporting observational studies. Am J Obstet Gynecol. 2014; 210:112-116.).
Can anyone help which weight in Stata would be the correct one to use in order to do the weighting in a similar way than it is done in the SAS example?
Best regards,
Johanna
----------------------------------------------------
SAS example:
DATA work.TWO;
input EXP OUT WT;
datalines;
1 1 182
1 2 478
2 1 87
2 2 319
;
run;
DATA work.TWO;
set work.TWO;
*WT is the weight from the comparability score;
IF (EXP = 1) then WT = WT;
else IF (EXP = 2) then WT = WT*6/12;
run;
PROC FREQ DATA = work.TWO;
weight WT;
table EXP*OUT / nocol nopercent cmh;
exact PCHI OR;
run;
---------------------------------------------------------------------
Can anyone help which weight in Stata would be the correct one to use in order to do the weighting in a similar way than it is done in the SAS example?
Best regards,
Johanna
----------------------------------------------------
SAS example:
DATA work.TWO;
input EXP OUT WT;
datalines;
1 1 182
1 2 478
2 1 87
2 2 319
;
run;
DATA work.TWO;
set work.TWO;
*WT is the weight from the comparability score;
IF (EXP = 1) then WT = WT;
else IF (EXP = 2) then WT = WT*6/12;
run;
PROC FREQ DATA = work.TWO;
weight WT;
table EXP*OUT / nocol nopercent cmh;
exact PCHI OR;
run;
---------------------------------------------------------------------