The SAS macro RelativeCosts1 is provided as a supplement to Collins, Dziak, & Li (2009).
It automates the calculation and graphing of relative costs of implementing different designs for multiple-factor experimental designs for screening or testing the effects of several independent dichotomous factors. It is written for use with SAS 9.1 for Windows.
Read more information about factorial experimental designs and the multiphase optimization stragetgy (MOST).
Sample File 1 can be run to demonstrate its use in a situation in which per-condition overhead costs are expected to be greater than per-subject marginal costs, and Sample File 2 demonstrates its use in the opposite situation.
Before using the macro, you must tell SAS where you have saved the file, e.g.,
%INCLUDE("c:\RelativeCosts1.sas");
To use the macro, call it using the syntax below, replacing the “???”’s with the appropriate values.
%RelativeCosts1( number_of_factors=???,
desired_fract_resolution=???,
min_target_d_per_factor=???,
condition_costlier_than_subject=???,
max_cost_ratio=???,
num_graph_points=???,
max_graph_ratio=???) ;
The meaning of the arguments are listed below.
The macro prints information such as the following to the output window.
Doing separate experiments on each of the 9 factors requires at least:
7074 subjects total, i.e. 393 subjects in each of 18 cells.
A comparative setup with 9 groups plus a control group requires at least:
3930 subjects total, i.e. 393 subjects in each of 10 cells.
A 2^9 complete factorial experiment requires at least:
1024 subjects total, i.e. 2 subjects in each of 512 cells.
A resolution 4 fractional factorial experiment with 9 factors requires at least:
800 subjects total, i.e. 25 subjects in each of 32 cells
The macro also produces a graph showing the relative costs of each design as a function of the ratio of per-condition overhead cost to per-subject cost (if condition_costlier_than_subject = 1) or per-subject cost to per-condition overhead cost (if condition_costlier_than_subject = 0). The ratios considered are 0 to max_cost_ratio, where the latter has a default value of 100. This macro is free and is provided for use without any warranty, implied or otherwise.
Collins, L. M., Dziak J. J., & Li, R. (2009). Design of experiments with multiple independent variables: A resource management perspective on complete and reduced factorial designs. Psychological Methods, 14(3), 202-24. PMCID: PMC2796056
Please send questions or comments about the macro to MChelpdesk@psu.edu.
If your organization does not permit download and installation of files, please contact us with a shipping address and we will provide a CD containing all downloadable files.

