BookmarkSubscribeRSS Feed
lfangtina
Calcite | Level 5

Hi, I was wondering how to use fixed effects for propensity score matching. Is this the right code?

 

ods graphics on;
proc psmatch data=merged2 region=cs;
class FE2_S_1 GENDER urban;
strata provcd;
psmodel FE2_S_1(Treated='1') = provcd urban AGE_MAX AGE_MIN indinc_net total_asset familysize GENDER QC1 QE1_BEST QG3 QK601 QM401 QP3;
match method=optimal(k=1) exact=GENDER distance=lps caliper=0.01;
assess ps var=(provcd urban AGE_MAX AGE_MIN indinc_net total_asset familysize GENDER QC1 QE1_BEST QG3 QK601 QM401 QP3)/ plots=all weight=none;
output out(obs=match)=OutEx1 matchid=_MatchID;
run;

 

"provcd" is the location provincial fixed effect that needs to be controlled.

 

1 REPLY 1
MichaelL_SAS
SAS Employee

I don’t think the example code provided is going to do quite what you want. The STRATA statement in PROC PSMATCH is used to divide the observations in the support region into strata of based on the propensity score values and would be ignored when a MATCH statement is also specified. For more information about stratification in PROC PSMATCH you can see the section “Propensity Score Stratification” in the PROC PSMATCH documentation or Example 98.2. This is different than how the STRATA statement is used in PROC LOGISTIC or PROC SURVEYLOGISTIC. 

 

I’m not sure if you are looking to control for the effect provcd when fitting the propensity score model by using stratified logistic regression or if you'd like to more directly control for provcd when performing the matching based on the predicted propensity score values.

 

If you want to fit a propensity score model by using stratified logistic regression you could use the STRATA statement in PROC LOGISTIC and then match on the propensity scores predicted from that model by using the PSDATA statement instead of  the PSMODEL statement in PROC PSMATCH. For an example of matching on pre-computed propensity scores you can see Example 98.8 in the PROC PSMATCH documentation

 

If you want to directly control for the variable provcd when matching one option would be to include it in the EXACT= option in the MATCH statement. I see your example already includes the EXACT= option so I’ll just note it is possible to perform an exact matching on multiple variables by using the EXACT=(variables) syntax.

 

One last note, I see that CALIPER=0.01 is specified in the MATCH statement. Note that by default PROC PSMATCH multiplies the value specified in the CALPIPER= option by a pooled estimate for the standard deviation of the matching distance (in your example code that would be the logit of the propensity scores) and uses this as the caliper value, so specify CALIPER=0.01 might result in a restrictive caliper value. If you’d like to use 0.01 as the caliper value you an use the syntax CALIPER(mult=one)=0.01.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1129 views
  • 0 likes
  • 2 in conversation