Presentation is loading. Please wait.

Presentation is loading. Please wait.

Michael Lamm and Yiu-Fai Yung SAS Institute

Similar presentations


Presentation on theme: "Michael Lamm and Yiu-Fai Yung SAS Institute"— Presentation transcript:

1 Causal Effect Estimation with Observational Data: Methods and Applications Part I
Michael Lamm and Yiu-Fai Yung SAS Institute 2018 Iowa and Nebraska SAS Users Groups Hi everyone! I am Yiu-Fai Yung. And this is Michael Lamm. Today we are going to give a workshop on causal treatment effect estimation. Because both of use work for SAS as software developers, we are going to illustrate all the analyses by SAS software. This is a basic course for causal effect analysis, and so I think that you can use other software to do similar analyses covered by this workshop. Hopefully, even if you are not a SAS user, this workshop can still offer you a good introduction of this important topic.

2 The central issue is about how to …
… estimate causal effects from observational data. The central issue of this workshop is about how to estimate causal effects from observational data. So this workshop is not about causal discovery or how to discover the causes of some given outcomes. Instead, this course discusses conditions and methods that enable you to obtain unbiased estimation of causal effects from observational given the specification of the cause of an outcome.

3 Causal analysis can address some practical research questions
Medicine: How does smoking effect blood pressure? Social policy: Can a particular youth program reduce the juvenile crime rate? Behavioral science: Does music training enhance academic performance? The generic causal question: Does T (binary treatment) cause Y (outcome)? For example, in medicine you ask whether a new drug can lower blood pressure? In social policy, you ask whether a particular youth program can reduce the juvenile crime rate? In behavioral science:, you ask question like “Does music training enhance academic performance?” Common to all these questions, you ask whether a binary treatment T cause the outcome Y? If so, how do you estimate causal effect?

4 Outline Part I Issues of causal inference from observational data Introducing the propensity score Theories and assumptions Matching methods Part II Weighting methods Doubly robust methods Limitations Summary and conclusions Here is the outline of this workshop. First, I introduce the issues about causal inferences from observational data. Then I am going to illustrate propensity score matching method and briefly describe the propensity score stratification method. I will spend some time on the theories and assumptions behind the causal analysis techniques. After that, I will show you the importance of checking covariate balance. In the middle , we will then take a ten-minute break. Michael will then take over and covers the weighting, regression adjustment, and doubly robust methods. He will also use an example to demonstrate different kinds of limitations of causal analysis that you might encounter in practice. Finally, I will make a summary and some conclusions. During the workshop, you are welcome to ask questions that clarify definitions and presentations. If you have complicated issues that need more time to discuss, we can do that after the workshop.

5 Software for estimating causal treatment effects
Two procedures in SAS/STAT® 14.2: PROC PSMATCH: creates appropriate data sets that behave like data you would have collected from randomized experiments PROC CAUSALTRT: estimates causal treatment effects by weighting, regression adjustment, and doubly robust methods In SAS/STAT 14.3: PROC CAUSALMED: estimates causal mediation effects The SAS software procedures that I’ve just mentioned are new in SAS/STAT 14.2, which was released about 1 year ago. The CAUSALTRT procedure can estimate causal treatment effects directly. The PSMATCH procedure, however, does not estimate causal effects itself. Rather, it creates data sets that behave like data that you would have collected from randomized experiments. You can then use these created data sets to estimate and test the causal treatment effects by doing usual statistical analysis such as t-test or other regression techniques.

6 Causal Analysis in Experimental and Observational Studies
Let me explain the issues about estimating causal effects in observational studies.

7 (Academic Performance)
An Experimental Study Music (Music Training) GPA (Academic Performance) Does music training enhance academic performance? Subjects are randomly assigned to the treatment and control conditions Observed association between T (Music) and Y (GPA)= causal effect Let me takes a previous example here. In establishing the causal effect of music training on academic performance, you can conduct a randomized experiment, where you assign students randomly to the treatment and control conditions. The students in the treatment condition receive a year of music training, while you make sure that the students in the control conditions are prohibited to receive any music training. At the end of the experiment, you use their GPA as measures for academic performance. Because you have used random assignment to the experimental conditions, you are confident that all the background characteristics of the students in the two conditions are similar and comparable. Hence, the observed GPA difference between the two groups should be attributed to the music training only. In this case, a randomized experiment can establish causal effects by isolating the cause from any potential confounding characteristics. That’s why randomized experiments are the gold standard for establishing causal effects. The difficulty, however, it is not always possible or practical to do randomized experiments.

8 Establishing the Causal Effect from an Observational Study
Sports Music (Music Training) GPA (Academic Performance) Observational studies: Subjects select the treatment Observed association between T (Music) and Y (GPA) = causal effect + confounding associations Now look at case of observational studies. Here, you do not control whether the students receive music training or not. You simply collect data about whether they have taken music training in the past year and their current GPAs. Without random assignment to the treatment or control conditions, the pre- treatment characteristics of the subjects are not controlled. These pre-treatment characteristics become the confounding variables in the observational study. In this causal diagram, Gender acts as a confounding variable for the observed music training effect on academic performance. In observational studies, the treatment effects are usually confounded by some pretreatment or background characteristics.

9 Confounding Variables
Pretreatment characteristics that are associated with the treatment (T) and the outcome (Y) variables Usually represented generically as common causes of T and Y A confounding pretreatment characteristic can take two roles: Explain parts of the treatment-outcome association Affect the propensity of receiving treatment To summarize, confounding variables in observational studies are those pretreatment or background characteristics that are associated with the treatment (T) and the outcome (Y) variables. They are usually represented generically as common causes of T and Y. In reality, the actual confounding mechanism could be more complicated. However, this representation serves well for the present purpose. There are two roles of the pretreatment characteristics can take. First, it explains parts of the treatment-outcome association in observational data. Second, it affects the propensity of receiving or taking the treatment.

10 Dealing with confounding pretreatment characteristics
Matching on confounding pretreatment characteristics: Covariate matching methods Propensity score matching and stratification methods Adjusting for the confounding pretreatment characteristics or propensity of receiving treatment: Weighting methods Regression adjustment methods Doubly robust methods In fact, all the methods for causal inferences discussed in this workshop are about some ways to deal with the confounding variables. Let me classify these methods loosely into two main classes. One class is the matching methods that are similar to what I have just illustrated. The matching methods make sure that the background or pretreatment characteristics are matched in the treatment and control conditions. The matching methods try to emulate the data properties from randomized experiments, where the pretreatment characteristics in treatment and control conditions are supposed to be well-balanced by random assignments. Intuitively, you can try to match all covariates in the treatment and control conditions. This could be easy to do when you just has few covariates to match. But matching would become much harder when you have a lot of covariates and with covariates that are continuous. Instead of using all covariates for matching, a simplified method is based on the matching of propensity scores, which we are going to described very soon. Another class of methods is by adjusting or controlling for the confounding pretreatment characteristics or the propensity of receiving treatment. These include the propensity score weighting and regression adjustment and will be covered in the second half of the workshop.

11 Introducing the Propensity Score Methods
Let us now dive into the propensity score methods.

12 What happens when you have many confounding pretreatment characteristics?
X1 X2 Xn ….. T (Treatment) Y (Outcome) Let me start with a general picture where you have many confounding pretreatment characteristics in an observational studies. Here you try to estimate the effect of T on Y in the presence of confounding pretreatment characteristics X1 to Xn.

13 Using the propensity score can reduce the complexity of the matching problem
Xn ….. T (Treatment) Y (Outcome) A propensity score is the probability of receiving treatment given 𝑋=𝑥: 𝑒 𝑥 =Prob 𝑇=1|𝑋=𝑥 Let me start with a general picture where you have many confounding pretreatment characteristics in an observational studies. Here you try to estimate the effect of T on Y in the presence of confounding pretreatment characteristics X1 to Xn.

14 Propensity score matching methods are …
Easier to apply than trying to match all pretreatment characteristics Theoretical foundation: uses the potential outcomes framework to clearly define causal effects and the conditions necessary for their unbiased estimation Once you establish a propensity score model, you can match individuals by using the propensity scores, which is just a single variable. So propensity score matching method can be easily applied no matter how many pre- treatment covariates are confounding the causal picture. It also has been justified theoretically that it can lead to unbiased estimation of causal effects.

15 Example 1. Using the Optimal Matching Method of the PSMATCH Procedure
Let me now illustrate the optimal matching method of PSMATCH.

16 Simulated “School” data (60 with music training, 140 without)
Student Obs ID Music Sports Absence Gpa No Yes No No No Yes No No Yes Yes No Yes No No No Yes Music is the treatment variable Gpa is the outcome variable Sport and Absence are pretreatment characteristics To demonstrate the PSMATCH procedure, I generated a larger data set “School.” This data set contains 60 units with music training and 140 units without. I also simulated the background characteristics and the GPA.

17 SAS Code proc psmatch data=School region=cs; class Music Sports; psmodel Music(Treated='Yes')= Sports Absence; match method=optimal(k=1) exact=Sports stat=lps caliper=0.25; assess ps var=(Sports Absence) / plots=all weight=none; output out(obs=match)=OutEx1 matchid=_MatchID; run; The requested optimal 1-1 method (method=optimal(k=1)) matches a distinct control unit (Music='No') to each treated unit (Music='Yes') A matched sample is saved in the output data set OutEx1 Now I apply the PSMATCH procedure to the “School” data set. Let me explain the important specifications here. In the PSMODEL statement, I specify Gender and Absence as the predictors of the propensity of receiving treatment. This statement specifies the propensity score model. In the MATCH statement, I specify the options and controls for matching control units to each of the treatment units. The 1-to-1 optimal matching method finds the matched units by considering all treated units (Music=‘Yes’) simultaneously. In addition, I request an exact match in gender (Exact=Gender ) for the matched units. (REGION=CS specifies the region of propensity scores for the units that you would include in the propensity score matching. CS means common support. That is, you only match units that fall within a common overlapping region of propensity scores. ) In the OUTPUT statement, I specify the matched samples be saved in an output data set, OutEx1, which I am going to use for doing a subsequent outcome analysis that estimate and test the causal treatment effect.

18 The output data set contains 120 matched observations (60 with music training, 60 without)
Student _Match Obs ID Music Sports Absence Gpa _PS_ _MATCHWGT_ ID 1 33 Yes Yes No Yes Yes Yes No Yes No Yes Yes Yes No No Yes No PROC PSMATCH successfully creates a matched sample that has 60 units in each of the treatment and control conditions. Here are the first eight observations of the matched sample. The first matched pair of observations is indicated by the same _MatchID. One receives music training and the other does not. Observation 2 has been selected to match Observation 1. They have similar propensity scores and the same gender, as required. Although Absence has not be used in the matching directly, their absence scores are also matched up to two decimal places for the first pair of observations. Similarly, the next three pairs of observations in the data set are matched pairs. In the fourth pair, observation 7 was selected to match observation 8. Both are males and have similar propensity scores. Again, although Absence has not be used in the matching directly, their absence scores are very close to each other.

19 Music training does not have a causal effect on academic performance (Gpa)
PS-matched sample: Nonsignificant causal effect proc ttest data=OutEx1; class Music; var Gpa; run; Variable: Gpa Music Method Mean % CL Mean No Yes Diff (1-2) Pooled Diff (1-2) Satterthwaite The 95% confidence intervals for the difference cover 0 Original sample: Significant but biased effect proc ttest data=School; class Music; var Gpa; run; Variable: Gpa Music Method Mean % CL Mean No Yes Diff (1-2) Pooled Diff (1-2) Satterthwaite Applying the t-test to the matched sample for an outcome analysis, the output displays the means of the treatment and control conditions. The mean difference is the causal effect estimate, which is if reverse the order. This test shows that the confidence intervals for the GPA difference between the treatment and control groups cover zero. This means that music training does not have significant causal effects on academic performance. In contrast, if you have used the original data set for the same outcome analysis , you have a slightly large causal effect estimate. The corresponding confidence intervals now do not cover the zero value. Although this is a significant effect, it is a biased one because you have not done anything to remove the confounding due to Gender or Absence. The 95% confidence intervals for the difference do not cover 0

20 Theories and Assumptions
Let us try to understand some theories and assumptions behind the methods discussed in this workshop.

21 Potential outcomes framework Neyman (1923), Rubin (1974)
Imagine that each subject can participate in both treatment and control conditions: 𝑌 1 : potential outcome in the treatment condition 𝑌 0 : potential outcome in the control condition Individual level causal effect: 𝑌 1 – 𝑌 0 Average treatment effect (ATE): E(𝑌 1 – 𝑌 0 ) Average treatment effect for the treated (ATT): E 𝑌 1 −𝑌 0 ) 𝑇=1) The foundation of the causal methodology discussed in this workshop is based on the potential outcomes framework, which was first proposed by Neyman and then further devloped by Rubin. In this framework, you imagine that each individual can participate in both the treatment and control conditions without any carryover effects. Y(1) denotes the potential outcome in the treatment condition. Y(0) denotes the potential outcome in control condition. For example, Y(1) might be whether the headache of an individual vanishes an hour after he took aspirin. Y(0) might be whether the headache of an individual vanishes an hour after he chose not to do anything (or just resting). Individual level causal treatment effect is simply defined as Y(1)-Y(0). But this individual level causal effect is seldom of research interest. Instead, the average treatment effect (ATE) is often the parameter of interest. ATE is an average over all individuals in the population. In addition to the ATE, another usual parameter of interest is the average treatment effect for the treated, abbreviated as ATT. This parameter is expected difference between Y(1) and Y(0), but is conditional on individuals who would be in the treatment condition.

22 The stable unit treatment value assumption (SUTVA) ensures that causal effects are well-defined (Rubin 1983) No hidden levels of treatment No interference among subjects There are several important assumptions under the potential outcomes framework. I am going to describe them one by one. The first assumption is the stable unit treatment value assumption, or SUTVA . This assumption basically ensures that causal effects are well-defined. SUTVA has two parts. The first part requires that you can have only one version of treatment. The second part requires that there is no interference among subjects. The first part requires that the administration of treatment is the same in quality and quantity for all individuals. For the “headache” example, it could mean that the aspirin is taken orally for all individuals and each of them takes exactly one pill of aspirin. The second part is much like our usual statistical assumption about independence of observations. That is, the treatment or outcome of one subject is not affected by the treatment or outcome of any other subjects. Violations of these assumptions would make your causal effect definition ambiguous or problematic.

23 The consistency assumption relates the observed outcomes to the potential outcomes
𝑌=𝑇∙𝑌 1 +(1−𝑇)∙𝑌 0 You can observe at most one of the potential outcomes Missing data problem: What can we know about the missing potential outcomes? To relate the potential outcomes to the actual observed outcome, the consistency assumption is required. This assumption states that the observed outcome, Y, is the same as the potential outcome with treatment level that is consistent with the actual treatment level. If you are in the treatment group, then your observed value is the same as the potential outcome Y(1). Otherwise, you observed Y(0). The also implies that you can at most observe only one of the potential outcomes for each subject. The other potential outcome is always missing. Therefore, some would look at causal effect estimation as a missing data problem. But we don’t have to pursue this point further.

24 Definitions and assumptions apply to both randomized experiments and observational studies
Same causal effect definitions by the difference in potential outcome means Same SUTVA for defining the causal effects Same consistency assumption about observing potential outcomes So far, the causal effect definitions and assumptions discussed apply to both randomized experiments and observational studies. We define causal treatment effect by the difference in potential outcome means. We need SUTVA to make causal effect well-defined. We need the consistency assumptions the make the observation of potential outcomes possible. However, the next assumption for randomized experiments is going to distinguish it from observational studies.

25 What enables randomized experiments to obtain unbiased estimation of causal effect?
You can safely assume the independence of potential outcomes and treatment assignment 𝑌 𝑖 ⫫𝑇 , 𝑖=0, 1 When you randomly assign individuals into treatment conditions, the variable T is supposed to be unrelated to any variables. In particular, the treatment variable is independent of any potential outcomes, as denoted by the expression 𝑌 𝑖 ⫫𝑇 , 𝑖=0, 1. Again, this assumption is only for randomized experiments, but not for observational studies.

26 As a consequence, for randomized experiments …
ℇ 𝑌 | 𝑇=1 =ℇ 𝑇𝑌 1 | 𝑇=1 =ℇ 𝑌 1 ℇ 𝑌 | 𝑇=0 =ℇ (1−𝑇)𝑌 0 | 𝑇=0 =ℇ 𝑌 0 Therefore, ℇ 𝑌 | 𝑇=1 −ℇ 𝑌 | 𝑇=0 =ℇ 𝑌 1 − ℇ 𝑌 0 You can use unadjusted treatment and control means to estimate causal effects As a result, for randomized experiments, we have the following equalities. In the first equality, the expression on the left side is the expected observed outcome given the treatment. By using the consistency assumption, we have the middle expression that is defined in terms of potential outcome. Finally, because of the independence of treatment and the potential outcomes in randomized experiments, it is equal to the unconditional potential outcome mean in the treatment condition. Similarly, the expected value of observed outcome given the control is the same as the potential outcome mean in the control condition. Combining these equalities shows that the average treatment effect, as defined in terms of expected potential outcome difference, can be estimated from the observed outcomes. Therefore, for randomized experiments, you can use unadjusted treatment and control means to estimate causal effects.

27 What about observational data?
In general, you cannot assume: 𝑌 𝑖 ⫫𝑇 , 𝑖=0, 1 So, ℇ 𝑌 | 𝑇=1 −ℇ 𝑌 | 𝑇=0 ≠ℇ 𝑌 1 −ℇ 𝑌 0 You cannot use unadjusted treatment and control means to estimate causal effects What about observational data? Typically, you cannot assume T is independent of potential outcomes. Without the independence assumption, you cannot use the observed outcome mean differences directly for estimating the causal treatment effect. For observational studies, we need another assumption in order to get unbiased estimation of the causal treatment effects.

28 The strong ignorability assumption ensures the identification of treatment effects
No unmeasured confounding: 𝑌 𝑖 ⫫𝑇 | 𝑋 , 𝑖=0, 1 Positivity: 0<𝑒 𝑥 <1 𝑒 𝑥 =Prob 𝑇=1|𝑋=𝑥 is the probability of receiving treatment given 𝑋=𝑥 The strong ignorability assumption is proposed. This assumption is also known as the identification condition for causal treatment effects. This assumption is usually described in two parts. The first part is called the “No unmeasured confounding assumption” and is essential for the identification of causal effect. It states that given the pretreatment characteristics X, the potential outcomes are independent of the treatment taken or received by individuals. This is similar to the property of the independence of potential outcomes and treatment, only that now you have to condition on X. But what does this mean practically? One way to interpret this is that you must be able to include all pretreatment characteristics X that could completely explain the mechanisms of treatment assignment so that given all these X, the treatment assignment is just random so that it is independent of the potential outcomes given X. The “Given X” part can be realized by matching, weighting, or conditioning using X in causal analysis. Notice that the no unmeasured confounding assumption is automatically satisfied for randomized experiments because X can be a null set. The second part of the strong ignorability assumption states that the propensity score of any subject must be between 0 and 1, exclusively. In other words, each subject should have a non-zero chance of receiving either the treatment or control conditions. The assumption ensures that it is possible to employ the causal methods developed. If this assumption is violated, it could lead to practical problems such as poor matching or adjustment. Causal effect estimation might then be biased. So, SUTVA, the consistency assumption and the strong ignorability assumption in the potential outcomes framework are required for unbiased estimation of causal effects.

29 Under these assumptions the propensity score becomes a natural basis for the matching problem
𝑌 𝑖 ⫫𝑇 | 𝑋 ⇒ 𝑌 𝑖 ⫫𝑇 |𝑒 𝑋 , 𝑖=0, 1 The propensity score methods lead to unbiased estimation of causal effects (Rosenbaum and Rubin 1983) In practice, a correct modeling of 𝑒 𝑋 =Prob 𝑇=1|𝑋 is required In addition, an important result has been shown by Rosenbaum and Rubin. The strong ignorability assumption ensures that you get unbiased estimation of causal effects conditioned on X. In addition, if the strong ignorability assumption is true, then it implies that conditional independence of potential outcomes and treatment can also be established with propensity scores. As a result, if strong ignorability holds, you can also get unbiased estimation of causal treatment effect by conditioning or matching on the propensity scores. Using propensity scores greatly simplifies the procedures for computing causal treatment effects. But remember that, using propensity score methods still need the strong ignorability assumption.

30 ATE or ATT? A standard answer: ATT is for policy making
What is your research question? What is your application? Are you interested in knowing the treatment effect if everybody in the population took the treatment? Are you interested in knowing the treatment effect only for those who take the treatment voluntarily? So ATE or ATT? A standard answer is that ATT for policy making. ATE is for general scientific knowledge. What does that mean? In fact, it would be easier to deal with this problem within a context and ask yourself about your research question and your application of analysis. For example, in the music training example, ATT has been estimated by the PS matching method. ATT makes sense if you want to promote your music program to those who attend your music lessons voluntarily. You might not care about the music training effect for those who did not attend. But if you are researching a general music training effect for a target population, your probably want to estimate ATE for its generality. Anyway, once you understand the difference between ATE and ATT, you should be able to judge which one to estimate within a particular practical context.

31 Matching aims to extract comparable groups that differ only in their treatment assignment
The ignorability assumption  independence of T and potential outcomes conditional on the background characteristics Balance in all covariates  balance in propensity scores; Balance in propensity scores  balance in covariates? First, the intuition for assessing covariate balance is that when you compare the outcomes between the treatment the and control conditions, you assume that all the background characteristics in the two conditions are similar or comparable so that the effect on the outcome can be attributed solely to the treatment variable. Covariate balance refers to the same or approximately the same distributions of these pretreatment characteristics in the treatment and control conditions. Covariate balance is supposed to be achieved by randomized experiments, but it can hardly be assumed for observational data. When you do propensity score or covariate matching, what you are actually doing is to try to re-create such a balance in order to compare the treatment and control conditions. In addition, in order to apply the strong ignorability assumption, you must be able to compare the observed potential outcomes given a set of covariates at some fixed values. If you don’t have covariate balance, you will have no ground to apply the strong ignorability assumption. If covariate balance is not achieved by matching, it will challenge the strong ignorability assumption and the validity of the matching method. Also, when you do propensity score matching, only the propensity scores are used. It does not guarantee covariate balance automatically.

32 Excluding the outcome from the matching process allows you to consider multiple propensity score models No (Re-) Specify a propensity score model Good covariate balance? Yes Outcome analysis What if the covariate balance results are not favorable? It would implies that either the propensity score model is wrong or the strong ignorability assumption might have been violated, or both. Either way, you try to fit another propensity score model and to see if you can achieve good covariate balance. You will only do an outcome analysis only after you are satisfied with the covariate balance. But how do you re-specify the propensity score model? There could be many possibilities. Specify another set of covariates in the propensity score model? Retain the same set of covariates but add interaction or higher-order terms in the propensity score model? Use another form of propensity score model rather than the logistic regression model? There seems to be no conventional recommendation on how to remedy the propensity score model systematically. Later in this workshop, Michael will use an example to demonstrate such a difficulty in practical applications.

33 Example 2. Optimal Variable Ratio Matching
Let me now illustrate the optimal matching method of PSMATCH.

34 Does quitting smoking lead to weight change?
Data: A subset (N=1,746) of NHANES I Epidemiologic Follow-Up Study (NHEFS) in Hernán and Robins (2016) Collect medical and behavioral information in an initial physical examination Follow-up interviews were done approximately 10 years later Treatment variable Quit: quit smoking during the 10-year period Outcome variable Change: change in weight (in kg) The data set here contains 1746 observations of an epidemiology study. The treatment variable is Quit, representing whether an individual quit smoking during a 10-year period. The outcome variable is Change, representing the change in weight. Hence, the central question is whether quitting smoking will cause weight change. Other background and behavioral information were also measured in an initial physical examination.

35 Other Variables Activity: Level of daily activity, with values 0, 1, and 2 Age: Age in 1971 BaseWeight: Weight in kilograms in 1971 Education: Level of education, with values 0, 1, 2, 3, and 4 Exercise: Amount of regular recreational exercise, with values 0, 1, and 2 PerDay: Number of cigarettes smoked per day in 1971 Race: 0 for white; 1 otherwise Sex: 0 for male; 1 for female Weight: Weight in kilograms at the follow-up interview YearsSmoke: Number of years an individual has smoked Here are those background characteristics.

36 Data Set data SmokingWeight;
input Sex Age Race Education Exercise BaseWeight Weight Change Activity YearsSmoke PerDay Quit; datalines; ... more lines ... ; Here is the data set.

37 SAS code for optimal variable ratio matching
proc psmatch data=smokingweight ; class Sex Race Education Exercise Activity Quit ; psmodel Quit(Treated='1') = Sex Age Education Exercise Activity YearsSmoke PerDay; match method=varratio(kmin=1 kmax=4) distance=lps caliper=.5; assess lps var=(age YearsSmoke)/plots=all; output out(obs=matched)=smokeMatched matchattwgt=matchattwgt matchId =MatchId; run; The kmin and kmax options control range for the ration of treated to control units in matched groups The matchattwgt= option names the matching ATT weights in the output data set Here is an example that uses the PSMATCH procedure. In the PSMATCH statement, you specify the data set. The REGION=ALLOBS option instructs the procedure to use all observations. In this example, you still specify the propensity score model in the PSMODEL statement. The propensity scores will be estimated from this model and then the weights are computed from the estimated propensity scores. Notice that you no longer use the MATCH statement because you are not requesting the propensity score matching method. The PSMATCH procedure produces weights in the output data set outPSWeights. You will then use this data set to do outcome analysis for the causal effect. This example still estimates the ATT because the weight being used in the WEIGHT statement of the t-test is _attwgt_.

38 The matching weights are used in assessing balance and in the outcome analysis
Obs age Quit ... _PS_ matchattwgt MatchId

39 How matching weights are computed?
For a matched set of units 𝑔 let: 𝑁 𝑔 be the total number of units in the set 𝑁 𝑔𝑡 be the number of treated units in the set 𝑁 𝑔𝑐 be the total number of control units in the set The ATT matching weights (matchattwgt) for set 𝑔 sum to 𝑁 𝑔𝑡 + 𝑁 𝑔𝑡 and are: : if the unit is in the treatment condition 𝑁 𝑔𝑡 𝑁𝑔𝑐 : if the unit is in the control condition The ATE matching weights for set 𝑔 sum to 𝑁 𝑔 + 𝑁 𝑔 and are: 𝑁 𝑔 𝑁𝑔𝑡 : if the unit is in the treatment condition 𝑁 𝑔 𝑁𝑔𝑐 : if the unit is in the control condition

40 Information on the input data and support region

41 Assessing covariate balance in PROC PSMATCH
assess lps var=(age YearsSmoke) / plots=all; The ASSESS statement LPS: requests the balance assessment for the logit of propensity scores VAR=(age YearsSmoke): lists the two variables for balance assessment PLOTS=ALL: displays all the plots for assessing covariate balance To illustrate, let us continue the previous example. In the ASSESS statement, you want to check the balance of the Gender, absence, and propensity scores between the treatment and control groups. You also request all the diagnostic plots by the PLOTS=ALL option. Let us look at some of the these results.

42 Distribution of the Logit of Propensity Scores
The box plot of the propensity scores also shows that the distribution of propensity scores are more balanced after matching are more balanced. The control condition seems to have a slightly larger variability in distribution after matching. This is supposed to be the case because we have used propensity scores directly for matching.

43 Standardized mean differences (Treated − Control)
This table shows the standardized mean differences between the treatment and control groups, before and after propensity score matching. Before the propensity score matching, you should look at the column labeled “All Obs”. The standardized mean differences in these columns are for those original unmatched observations. Here, except for Gender, the standardized mean differences for PS and Absence are not ignorable. Let’s us now look at the matched observations. The column to look at is the “MatchedObs” column. If the covariate distributions are similar in the treatment and control conditions after matching, the standardized mean differences should be close to zero. Indeed, this is the case. This gives support the propensity score model for matching.

44 Visualize the standardized mean differences
This plot visualizes the standardized mean differences between the treatment and control groups. Cutoff points are set to + or This is a conventional level to accept balance of the standardized mean differences. The green circles are those mean differences after matching. All are close to the center at zero.

45 Distributions are plotted for continuous variables
You can also look at the variance ratios of these variables before and after propensity score matching. If the variables have approximately the same variance, then the variance ratios should be close to 1. In the “All Obs” column, except for Gender, the variance ratios for the propensity scores and the absence variable are not close to 1. After propensity score matching, all variance ratios are much closer to one. This means that the variance of these variables are very similar in the treatment conditions after matching. Hence, by comparing the first and the second moments, we found that the treatment and control conditions did achieve balance after the propensity score matching. We do not find any indications that would jeopardize the tenability of strong ignorability assumption for unbiased causal effect estimation.

46 Use PROC FREQ to examine categorical variables
proc freq data=smokeMatched; tables quit*Exercise quit*Activity; weight matchattwgt; run;

47 Distributions of Exercise and Activity for the treatment conditions

48 Estimation of the ATT proc ttest data=smokeMatched; class quit; var change; weight matchattwgt; run; Variable: Change Quit Method Mean % CL Mean Diff (1-2) Pooled Diff (1-2) Satterthwaite

49 Important Options for the Matching Methods of PROC PSMATCH
Feature METHOD= Optimal fixed ratio (OPTIMAL) Optimal variable ratio (VARRATIO) Optimal full matching (FULL) Greedy nearest neighbor matching (GREEDY) Replacement matching (REPLACE) CALIPER= Specifies the criterion for matching EXACT= Specifies class variables that require exact matching STAT= or DISTANCE= Specifies the distance measure for matching (PS, LPS, or MAH) We have covered only parts of the features in the matching method of PROC PSMATCH, namely, the 1-to-1 optimal matching. There are a variety of matching methods you can use. For example, GREEDY, FULL, or replacement matching are also available. You can also control many other parameters in the matching method through various options, such as CALIPER=, EXACT= and DISTANCE= options.


Download ppt "Michael Lamm and Yiu-Fai Yung SAS Institute"

Similar presentations


Ads by Google