PSMODEL treatment <(variable-options)><= effects </ psmodel-options>>;
For all the estimation methods that PROC CAUSALTRT implements, you must specify a treatment variable in a PSMODEL statement. The regression model that is fit by the PSMODEL statement is called the propensity score model. The propensity score refers to the probability of receiving treatment conditional on the model effects. For more information about the estimation methods that PROC CAUSALTRT implements, see the section Estimating the Average Treatment Effect (ATE).
In addition to specifying the treatment variable, you can also specify the following:
specify one or more explanatory variables or a combination of variables that are used to fit a regression model for the treatment variable. Explanatory variables that represent nominal (classification) data must be declared in the CLASS statement. For more information about specifying effects, see the section Specification of Effects in Chapter 53, The GLM Procedure.
specify one or more of the following options within parentheses for after the treatment variable:
reverses the order of the treatment categories. If both the DESCENDING and ORDER= options are specified, PROC CAUSALTRT orders the treatment categories according to the ORDER= option and then reverses that order.
specifies the event category for the binary treatment model. PROC CAUSALTRT models the probability of the event category. You can specify one of the following:
specifies the value (formatted if a format is applied) of the event category in quotation marks.
designates the first-ordered category as the event.
designates the last-ordered category as the event.
By default, EVENT=FIRST.
One of the most common sets of treatment levels is {0,1}, where 1 represents the event for which the probability is to be modeled. Consider the following example, where T takes the values 1 and 0 for event and nonevent, respectively, and X is the explanatory variable. To specify the value 1 as the event category, use the following PSMODEL statement:
psmodel T(event='1') = X;
specifies the sort order for the levels of the treatment variable. The following table displays the available ORDER= options.
| ORDER= | Levels Sorted By |
|---|---|
| DATA | Order of appearance in the input data set. |
| FORMATTED | External formatted value, except for numeric variables that have no explicit format, which are sorted by their unformatted (internal) value. The sort order is machine-dependent. |
| FREQ | Descending frequency count. Levels that have the most observations come first in the order. |
| INTERNAL | Unformatted value. The sort order is machine-dependent. |
By default, ORDER=FORMATTED.
For more information about sort order, see the chapter on the SORT procedure in the Base SAS Procedures Guide and the discussion of BY-group processing in SAS Programmers Guide: Essentials.
specifies the reference category for the binary treatment model. Specifying one treatment category as the reference is the same as specifying the other treatment category as the event category. You can specify one of the following:
specifies the value (formatted if a format is applied) of the reference category in quotation marks.
designates the first-ordered category as the reference.
designates the last-ordered category as the reference.
By default, REF=LAST.
specify additional options for the propensity score model after a slash (/). These psmodel-options are summarized in Table 7 and described in detail after the table. These options are applied only if the estimation method you request requires fitting a propensity score model.
Table 7: psmodel-options in the PSMODEL Statement
specifies a number to use as the level for
% confidence limits that the PSMODEL statement computes. The value of number must be between 0 and 1. The default value of number is the set by the ALPHA= option in the PROC CAUSALTRT statement.
produces ODS graphics by using the predicted propensity scores. No graphics are produced if you specify the PLOTS=NONE option in the PROC CAUSALTRT statement or if the estimation method used does not require fitting a propensity score model.
ODS Graphics must be enabled before plots can be requested. For example:
ods graphics on;
proc causaltrt method=ipwr;
model y;
psmodel trt = x1 x2 /plots=all;
run;
ods graphics off;
For more information about enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics in Chapter 24, Statistical Graphics Using ODS.
You can specify the following plot-requests:
produces all possible plots.
produces overlaid density plots for the logit of the propensity score within each treatment condition.
suppresses all plots that the PSMODEL statement could produce. This plot-request is used to suppress output if the PLOTS=ALL option is specified in the PROC CAUSALTRT statement.
produces a scatter plot of the outcome variable by the propensity score for nonbinary outcomes. If the outcome is binary, box plots of the propensity scores within treatment conditions are produced for each outcome level. The whisker lengths for each box plot are determined by the maximum and minimum of the propensity scores.
produces a scatter plot of the outcome variable by weight for nonbinary outcomes. If the outcome is binary, box plots of the weights within treatment conditions are produced for each outcome level. The whisker lengths for each box plot are determined by the maximum and minimum of the weights.
produces a point cloud of the propensity scores by jittering within the control and treatment conditions.
produces density plots for the covariates or continuous effects that are specified in the PSMODEL statement. Each plot displays the density of effects for the treatment and control condition. Two plots are produced for each effect: one plot displays unweighted densities, and the other plot displays densities that are weighted by inverse probability weights. By default, plots are produced for all continuous effects that are specified in the PSMODEL statement, and the plots are collected in panels. You can specify the following pscovden-options:
specifies the effects for which density plots are produced. Plots are produced only for continuous effects that are specified in the PSMODEL statement. The effects consist of an explanatory variable or combination of variables. The syntax for specifying effects in this option is the same as the syntax for specifying effects in the MODEL and PSMODEL statements.
suppresses paneling. By default, multiple plots can appear in the same output panel. You can use this option to display each plot separately.
creates a separate panel for each effect. Each panel has a single row and two columns that contain the unweighted and weighted density plots. This option is ignored if you specify the UNPACK option in the PROC CAUSALTRT or PSMODEL statements.
produces a box plot of the propensity scores for each treatment condition. The whisker lengths for each box plot are determined by the maximum and minimum of the propensity scores.
produces a point cloud of the weights by jittering within the control and treatment conditions.
produces a box plot of the weights for each treatment condition. The whisker lengths for each box plot are determined by the maximum and minimum of the weights.
You can specify the following global-plot-options:
suppresses plots that are not specified as a plot-request. This option applies only if the PLOTS= option is specified in the PROC CAUSALTRT statement.
suppresses paneling. By default, multiple plots can appear in the same output panel. You can specify UNPACK to display each plot separately.
specifies a number to use to flag large weights. The value of number must be greater than or equal to 1. If any observations have weights greater than number, a note is added to the SAS log. By default, WGTFLAG=50.