The CAUSALTRT Procedure

BOOTSTRAP Statement

  • BOOTSTRAP < options>;

A BOOTSTRAP statement requests bootstrap estimation of confidence intervals for the potential outcome means and treatment effect estimates. The bootstrap samples are taken from within the treatment conditions. To produce the plots that are controlled by the BOOTSTRAP statement, ODS Graphics must be enabled. PROC CAUSALTRT ignores the BOOTSTRAP statement if the initial estimation of the treatment effect results in an error or if the NOEFFECT option is specified in the PROC CAUSALTRT statement.

Table 3 summarizes the options available in the BOOTSTRAP statement.

Table 3: Summary of Options in BOOTSTRAP Statement

Option Description
BOOTCI Produces bootstrap confidence intervals of the estimates
BOOTDATA= Specifies the bootstrap output data set
NBOOT= Specifies the number of bootstrap sample data sets (replicates)
NOSKIP Includes bootstrap samples that have inconsistent class levels
PLOTS= Produces plots of the bootstrap estimates
SEED= Specifies the seed that initializes the random number stream


You can specify the following options:

BOOTCI <(BC | NORMAL | PERC  | ALL)>

computes bootstrap-based confidence intervals for the potential outcome means and the treatment effect estimates, and displays the values in the "Analysis of Causal Effect" table. This table includes a column that indicates the number of bootstrap samples used to compute the confidence intervals; this column is not displayed but is available if you save the table as an output data set by using the ODS OUTPUT statement. You can also display this column by modifying the corresponding template.

You can specify one or more of the following types of bootstrap confidence intervals separated by spaces:

BC

produces bias-corrected confidence intervals. You must specify a value of 1,000 or more for the NBOOT= option, but the confidence intervals are not computed if fewer than 900 bootstrap replicates produce bootstrap estimates.

NORMAL

produces confidence intervals that are based on the assumption that bootstrap estimates follow a normal distribution. You must specify a value of 50 or more for the value NBOOT= option, but the corresponding standard errors and confidence intervals are not computed if fewer than 40 bootstrap replicates produce bootstrap estimates.

PERC

produces percentile-based confidence intervals. You must specify a value of 1,000 or more for the NBOOT= option, but the confidence intervals are not computed if fewer than 900 bootstrap replicates produce bootstrap estimates.

ALL

produces all three confidence intervals.

The ALPHA= option in the PROC CAUSALTRT statement sets the level of significance that is used to construct the bootstrap confidence intervals. For more information about how the bootstrap-based confidence intervals are computed, see the section Bootstrap Methods. By default, BOOTCI=BC and PROC CAUSALTRT produces bias-corrected confidence intervals based on 1,000 bootstrap samples.

BOOTDATA=SAS-data-set

specifies the SAS-data-set that contains the estimates for the potential outcome means and treatment effect for each bootstrap sample that converges.

NBOOT=n
NSAMPLE=n
NSAMPLES=n

specifies the number of bootstrap sample data sets (replicates). A maximum of 10,000 bootstrap sample data sets can be requested. By default, NBOOT=1000.

NOSKIP

includes in the bootstrap estimation bootstrap samples that have inconsistent class levels in either the treatment or outcome model. By default, for any classification variable in a bootstrap sample data set that does not contain all levels that have been used in fitting either the treatment or outcome model for the original input data set, PROC CAUSALTRT treats the corresponding bootstrap sample estimates as nonconvergent and skips the estimation of the treatment effect. This option overrides the default and continues the estimation of the treatment effect for bootstrap samples that have inconsistent class levels.

PLOTS <(global-plot-options)><=plot-request<(options)>>

produces ODS graphics of bootstrap estimates. By default, if you specify the PLOTS option, a panel is produced with the histograms of the bootstrap estimates for the potential outcome means and treatment effect. No graphics are produced if you specify the PLOTS=NONE option in the PROC CAUSALTRT statement.

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;
   bootstrap plot;
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:

HIST<(EFFECT | POMCNT | POMTRT)>
HISTOGRAM<(EFFECT | POMCNT | POMTRT)>

produces histograms of the bootstrap estimates for the potential outcome means and treatment effect, which are displayed in a panel by default. You can request output of specific histograms by specifying one or more the following additional suboptions:

EFFECT

produces a histogram of the bootstrap estimates for the treatment effect.

POMCNT

produces a histogram of the bootstrap estimates for the potential outcome mean of the control condition.

POMTRT

produces a histogram of the bootstrap estimates for the potential outcome mean of the treatment condition.

If you specify the ATT option in the PROC CAUSALTRT statement, then the histogram produced by the EFFECT suboption is the average treatment effect for the treated, and the histograms produced by the POMCNT and POMTRT suboptions are the potential outcome means conditioned on having received treatment. For more information about the differences between the average treatment effect and average treatment effect for the treated, see the section Causal Effects: Definitions, Assumptions, and Identification.

NONE

suppresses all plots that are usually produced by the BOOTSTRAP statement. You can use this option to suppress output if the PLOTS=ALL option is specified in the PROC CAUSALTRT statement.

You can specify the following global-plot-option:

UNPACK
UNPACKPANEL

suppresses paneling. By default, multiple histograms of bootstrap estimates appear in the same output panel. You can use this option to display each histogram separately.

SEED=n

provides the seed that initializes the random number stream for generating the bootstrap sample data sets (replicates). If you do not specify this option or if you specify a value for n that is less than or equal to 0, the seed is generated from reading the time of day from the computer’s clock. The largest possible value for the seed is 2 Superscript 31 Baseline minus 1.

You can use the SYSRANDOM and SYSRANEND macro variables after a PROC CAUSALTRT step to query the initial and final seed values. However, using the final seed value as the starting seed for a subsequent analysis does not continue the random number stream where the previous analysis ended. The SYSRANEND macro variable provides a mechanism to pass on seed values to ensure that the sequence of random numbers is the same every time you run an entire program. To reproduce the random number stream that was used to generate bootstrap estimates, you must use the same SEED= value and the same number of threads for the analytic computations. When bootstrap resampling is performed, a column that indicates the number of threads used is added to the "Analysis of Causal Effect" table; this column is not displayed but is available if you use the ODS OUTPUT statement to save the table as an output data set. You can also display this column by modifying the corresponding template.

Last updated: December 09, 2022