Back to Module
Propensity Scores
0% Complete
0/0 Steps
-
Getting Started
-
Background1 Topic
-
Introduction to Propensity Scores2 Topics|2 Quizzes
-
Estimating and Assessing the Propensity Score4 Topics
-
Applying the Propensity Score5 Topics
-
High-Dimensional Propensity Scores2 Topics
-
Applying the High-Dimensional Propensity Score3 Topics
-
References
-
Additional Resources
Section 5,
Topic 3
In Progress
Applying cohort trimming
Section Progress
0% Complete
Step 2: Trimming the cohort
Next, trim the areas of no-overlap in the cohort. First try doing this on your own using the simulated data sets.
Reveal example code below if you need a hint or want to check your work.
Example code (click to reveal)
proc sort data=ps_out;
by exposure;
run;
proc univariate data=ps_out noprint;
var ps;
by exposure;
output out=ps_range min=min max=max;
run;
data _null_;
set ps_range;
if exposure=1 then do;
call symput("min_exposed",min);
call symput("max_exposed",max);
end;
else do;
call symput("min_unexposed",min);
call symput("max_unexposed",max);
end;
run;
data ps_trim;
set ps_out;
if ps >= max(&min_exposed,&min_unexposed) and ps <= min(&max_exposed,&max_unexposed);
run;