-------------------------------------------------------------------------------
help for multproc and smileplot                                  (Roger Newson)
-------------------------------------------------------------------------------

Multiple test procedures and smile plots

multproc [if] [in] [ , puncor( { # | scalarname | varname } ) pcor( { # | scalarname | varname } ) method(method_name) pvalue(varname) rank(newvarname) gpuncor(newvarname) critical(newvarname) gpcor(newvarname) nhcred(newvarname) reject(newvarname) float fast ]

smileplot [if] [in] [ , estimate(varname) logbase(#) maxylabs(#) xlog nline(#) ptsymbol(symbol) ptlabel(varname) scatteropts(scatter_options) refopts(added_line_options_1) nrefopts(added_line_options_2) urefopts(added_line_options_3) crefopts(added_line_options_4) addplot(plot) plot(plot) by(varlist) multproc_options twoway_options ]

where multproc_options is a list of options recognised by multproc, and twoway_options is a list of options recognised by twoway (see help for twoway_options).

by varlist: can be used with multproc and smileplot. (See help for by.) If by varlist: is used, then the log output, and all generated variables, are calculated using the specified multiple test procedure within each by-group defined by the variables in the varlist.

Description

multproc takes, as input, a dataset with one value for each of a set of multiple statistical tests of multiple null hypotheses, including a variable containing P-values for these tests, and an uncorrected overall critical P-value specified by the user, and carries out a multiple test procedure. A multiple test procedure calculates a corrected overall critical P-value, which has the feature that an individual null hypothesis is considered to be acceptable if and only if its corresponding P-value is greater than the corrected overall critical P-value. smileplot takes, as input, a dataset with one observation for each of a set of estimated parameters, and data on their estimates and P-values. smileplot calls multproc to carry out a multiple test procedure, and then creates a smile plot, with data points corresponding to estimated parameters, the corresponding P-values (on a reverse log scale) on the Y-axis, and another variable (usually the corresponding parameter estimates) on the X-axis. There are Y-axis reference lines corresponding to the uncorrected and corrected overall critical P-values. The Y-axis reference line corresponding to the corrected overall critical P-value is known as the parapet line. Data points on or above the parapet line correspond to rejected null hypotheses. There may be a reference line on the X-axis corresponding to the value of the parameter under a null hypothesis (defaulting to 1 if the X-axis is logged, 0 otherwise). The user can therefore see, at a glance, both the statistical significance and the practical significance of each parameter estimate, and can also see the parapet line as an "upper confidence bound" on the Y-axis for how many of the corresponding null hypotheses are true. multproc and smileplot are usually used on datasets with one observation per parameter estimate and data on estimates and their P-values. Such datasets may be created (directly or indirectly) by postfile, statsby, parmby or parmest.

smileplot changed markedly in style in the transition from Stata Version 7 to Stata Version 8. Users who prefer to use the Stata 7 version can still do so by using smileplot7.

Options for multproc and smileplot

puncor( { # | scalarname | varname } ) specifies the uncorrected overall critical P-value for statistical significance. This option may be specified either as a number, or as a scalar, or as a variable (in which case the variable is expected to contain only one non-missing value in the sample or by-group). If absent, this option is set to 1-$S_level/100, where $S_level is the value of the currently set default confidence level.

pcor( { # | scalarname | varname } ) specifies the corrected overall critical P-value for statistical significance. This option may be specified either as a number, or as a scalar, or as a variable (in which case the variable is expected to contain only one non-missing value in the sample or by-group). If absent, this option is set by the method specified in the method option (see below).

method(method_name) specifies the multiple test procedure method to be used for deriving the corrected P-value threshold from the uncorrected P-value threshold. This option is ignored, and set to userspecified, if the pcor option is specified and in the range 0 <= pcor <= 1. Otherwise, if method is absent, then it is set to bonferroni.

pvalue(varname) is the name of the variable containing the P-values. If this option is absent, then multproc looks for a variable named p (as created by parmby or parmest). multproc carries out a multiple test procedure on all observations selected by the if and/or in qualifiers which also have non-missing values for the variable containing the P-values.

rank(newvarname) is the name of a new variable to be generated, containing, in each observation, the rank of the corresponding P-value, from the lowest to the highest. Tied P-values are ranked according to their position in the input dataset. If by varlist: is specified with multproc, then the ranks are defined within the by-group.

gpuncor(newvarname) is the name of a new variable to be generated, containing, in each observation, the uncorrected overall critical P-value, as specified by the puncor option, or by the standard default if the puncor option is not specified. This new variable will have the same value for all observations in the sample of observations used by multproc or smileplot.

critical(newvarname) is the name of a new variable to be generated, containing, in each observation, an individual critical P-value corresponding to the original P-value in the variable specified by pvalue. The values of the individual critical P-values are defined by a non-decreasing function (specified by the method option) of the ranks of the corresponding original P-values (generated by the rank option). The corrected overall critical P-value is selected from the individual critical P-values in a way specified by the method option, depending on whether the method specified is a one-step method, a step-down method, or a step-up method.

gpcor(newvarname) is the name of a new variable to be generated, containing, in each observation, the corrected overall critical P-value, as specified by the pcor option, or by the method option if the pcor option is not specified. If by varlist: is specified with multproc, then the value of this new variable will be the same in all observations within each by-group, but may be different for observations in different by-groups, if a step-up or step-down procedure is specified by the method option.

nhcred(newvarname) is the name of a new variable to be generated, containing, for each observation, an indicator of the credibility of the corresponding null hypothesis under the method specified by the method option. This indicator is 1 if the null hypothesis is credible, and 0 otherwise. A null hypothesis is said to be credible if its P-value is greater than the corrected overall critical P-value. The set of observations with a value of 1 corresponds to a set of credible null hypotheses. The exact interpretation of the set of credible null hypotheses depends on whether the method specified controls the family-wise error rate (FWER) or the false discovery rate (FDR).

reject(newvarname) is the name of a new variable to be generated, containing, for each observation, an indicator of the rejection of the corresponding null hypothesis under the method specified by the method option. This indicator is 1 if the null hypothesis is rejected, and 0 otherwise. The new variable generated by the reject option is therefore the negation of the new variable generated by the nhcred option.

float specifies that the individual critical P-value variable specified by critical() (if requested) will be created as a float variable. If float is absent, then the critical() variable is created as a double variable. Whether or not float is specified, all generated variables are stored to the lowest precision possible without loss of information.

fast is an option for programmers. It specifies that multproc and smileplot will not take any action so that it can restore the original data if the user presses Break.

Options available for smileplot only

estimate(varname) is the name of the variable to be plotted on the X-axis, usually containing the parameter estimates corresponding to the P-values specified by the pvalue option. If this option is absent, then smileplot looks for a variable named estimate (as created by parmby or parmest). smileplot carries out a multiple test procedure by calling multproc for observations with non-missing values for the variables specified by the estimate and pvalue options, using the if and/or in qualifiers if these are supplied by the user. Note that the variable specified by estimate may contain values that are not parameter estimates. For instance, the observations may correspond to genes in a genome scan, the P-values may be derived from tests for associations of those genes with a disease, and the X-axis variable specified by the estimate option may contain the positions of those genes on a chromosome map.

logbase(#) specifies a log base used to define the Y-axis labels. This log base is a factor by which each Y-axis label is divided to arrive at the next Y-axis label, where the Y-axis labels are ordered from the highest P-value to the lowest P-value. If absent, this option is set to 10, so the Y-labels are set to non-positive powers of 10. If this rule defines too many Y-axis labels, then the Y-axis labels are set to be every kth member of the logarithmic series, where k is the minimum positive integer such that the number of Y-axis labels defined in this way is not too large.

maxylabs(#) specifies the maximum number of Y-axis labels allowed. If this option is not specified, then it is set to 25, so as to be similar to the Stata 7 version of smileplot, which the user can still use by using smileplot7. maxylabs is used with logbase to decide the default sequence of labels on the left Y-axis. These are chosen to be spaced exponentially, separated by a factor equal to the smallest possible power of logbase such that the number of labels is no more than maxylabs. This is usually a sensible default, but it can be overridden by the twoway_options.

xlog specifies that the X-axis must have a log scale. It is typically used if the parameters estimated are odds ratios or geometric mean ratios. It affects the default value of the nline option (see below). It may be overridden by specifications in an xscale option in the twoway_options (see help for axis_scale_options or twoway_options).

nline(#) specifies the position, on the X-axis, of the reference line indicating the value of the estimated parameters under the null hypothesis. If nline is unspecified, then it is set to 1 if xlog is specified and to 0 otherwise. This option allows the user to plot odds ratios and geometric mean ratios on a linear scale, instead of on the more usual log scale. If nline is set to a missing value by specifying nline(.), then the null reference line is suppressed. This is useful for creating "smile plots" for which the X-axis variable specified by the estimate option contains values other than parameter estimates, such as positions of genes on a chromosome map.

ptsymbol(symbol) specifies a graph marker symbol for the data points of the smile plot. This may be any one of the marker symbols named in the help for symbolstyle. If absent, it is set to Th (hollow triangles). This option may be overridden by the option scatteropts (see below).

ptlabel(varname) specifies a variable to be used to label the data points in the manner specified by the mlabel graph option (see help for marker_label_options). If this option is absent, then there are no data point labels, only unlabelled data points. This option may be overridden by the option scatteropts (see below).

scatteropts(scatter_options) specifies a sequence of options for the twoway scatter plot type. These options may include msymbol and mlabel options, which override the ptsymbol and ptlabel options, respectively, and other options specifying non-default attributes for the symbols and/or labels, such as size and color. (See help for scatter). The user may specify any of these options except for xaxis or yaxis, because smileplot automatically sets the first X-axis to be the $X$-axis of the smile plot (specified by the estimate option) and the first and second Y-axes to be the left and right Y-axes used by the smile plot (corresponding to the pvalue option). The second Y-axis is used to display the values of the uncorrected and corrected overall critical P-values.

refopts(added_line_options_1) specifies a list of added line suboptions, as allowed for the xline or yline options. These options control the style of the X-axis and Y-axis reference lines of the smile plot, corresponding to the null hypothesis, the uncorrected overall critical P-value, and the corrected overall critical P-value, respectively. The options specified by refopts apply to all 3 of these reference lines, except if overridden by the nrefopts, urefopts and/or crefopts options (see below). If refopts is absent, then it is set to a default, namely refopts(lstyle(xyline)). This causes the lines to have a default style depending on the scheme. (See help for schemes and linestyle.)

nrefopts(added_line_options_2) specifies a list of added line suboptions, as allowed for the xline or yline options. These options control the style of the X-axis reference line of the smile plot, corresponding to the null hypothesis. The options specified by nrefopts override those specified by refopts, allowing the null hypothesis reference line to have a different style from the other reference lines.

urefopts(added_line_options_3) specifies a list of added line suboptions, as allowed for the xline or yline options. These options control the style of the Y-axis reference line of the smile plot indicating the uncorrected overall critical P-value. The options specified by urefopts override those specified by refopts, allowing the uncorrected P-value reference line to have a different style from the other reference lines.

crefopts(added_line_options_4) specifies a list of added line suboptions, as allowed for the xline or yline options. These options control the style of the Y-axis reference line of the smile plot indicating the corrected overall critical P-value. The options specified by crefopts override those specified by refopts, allowing the uncorrected P-value reference line to have a different style from the other reference lines.

addplot(plot) provides a way to add other plots to the generated graph. See help for addplot_option.

plot(plot) is an obsolete alternative name for the addplot() option, used by earlier versions of smileplot. It is provided so that old do-files will still run.

by(varlist) is a graph twoway option, and works as for graph twoway, creating one subplot for each by-group, arranged in an array as specified by the user. (See help for the by-option.) The corrected overall critical P-value, indicated by a line at the same level on all the subplots, is calculated from all the P-values from all the by-groups pooled together, not for the subset of P-values in each by-group individually. (This is in contrast to the use of by varlist:, which causes corrected individual and overall critical P-values to be calculated only from the subset of P-values in each by-group.)

Remarks

Multiple test procedures and smile plots are reviewed in Newson et al. (2003). An alternative method, for some multiple-test procedures, is the method of frequentist q-values, implemented using the SSC package qqvalue and described in Newson (2010).

The smile plot is so named because, if the standard errors of the parameters are similar, then the data points fall along a curve shaped like a smile. It summarises a set of multiple parameter estimates graphically, in the way that a Cochrane forest plot summarises a meta-analysis. The Y-axis reference line corresponding to the corrected overall critical P-value is known as the parapet line. Data points on or above the parapet line correspond to parameters for which we can reject the null hypotheses under the specified multiple test procedure. Data points below the parapet line correspond to parameters for which the null hypotheses are credible (acceptable).

The methods specified by the method option are multiple test procedures for defining an upper confidence bound for the set of null hypotheses that are true, given multiple parameter estimates with multiple P-values. More formally, each method defines a set of credible (or acceptable) null hypotheses and a set of incredible (rejected) null hypotheses, whose exact interpretation depends on the method. The uncorrected overall P-value may either be treated as an upper bound for the family-wise error rate (FWER), or be treated as an upper bound for the false discovery rate (FDR).

The FWER is the probability that at least one true null hypothesis is rejected. If a method controls the FWER, then the power set of the set of credible null hypotheses is a power-set-valued confidence region for a set-valued parameter, namely the set of null hypotheses which are true. We can therefore say, with a confidence level of 100*(1-puncor) percent, that the set of null hypotheses that are true is some subset (possibly empty) of the set of credible null hypotheses. In other words, we are 100*(1-puncor) percent confident that all the rejected null hypotheses are false. FWER-controlling procedures are reviewed in Wright (1992).

The FDR is defined as follows. Let V denote the number of true null hypotheses rejected, and let R denote the total number of null hypotheses rejected. Then the FDR is equal to the expectation of Q, where Q is defined to be equal to V/R if R>0, and equal to zero if R=0. The probability that Q=1 can be no more than the FDR. Therefore, if the method controls the FDR, then we can say, with 100*(1-puncor) percent confidence, that the set of null hypotheses that are true is a subset of null hypotheses (possibly empty) which does not contain the rejected set as a non-empty subset. In other words, we are 100*(1-puncor) percent confident that at least some of the rejected null hypotheses are false. If the number of null hypotheses tested is very large indeed, then, arguably, we may be 100 percent confident that 100*(1-puncor) percent of the rejected null hypotheses are false.

The methods may also be classified into one-step, step-down and step-up procedures. All three classes of methods work by defining a list of m individual critical P-values C_1,...,C_m, one for each of the m individual input P-values P_1,...,P_m, ranked from the lowest to the highest. These individual critical P-values can be saved as output using the critical option, and are defined as a non-decreasing function of the ranks of the original P-values, which can be saved as output using the rank option. An overall corrected critical P-value pcor is selected from the individual critical P-values. A null hypothesis is acceptable if and only if its P-value is greater than the overall corrected critical P-value. For a one-step procedure, the C_i are all equal to the overall corrected critical P-value pcor, which is defined as a function of the uncorrected critical P-value puncor. For a step-down procedure, pcor is equal to the lowest C_i such that P_i > Ci, if such a C_i exists, and equal to C_m otherwise. For a step-up procedure, pcor is equal to the highest C_i such that P_i <= C_i, if such a C_i exists, and equal to C_1 otherwise.

The different methods use different assumptions. Some assume that the different P-values are statistically independent, others allow the different P-values to be non-negatively correlated, and others allow the different P-values to be arbitrarily correlated. The more recently developed methods are documented in their original source papers. The available methods are as follows:

Method Step type FWER/FDR Definition or source userspecified One-step Either pcor option bonferroni One-step FWER pcor=puncor/m sidak One-step FWER pcor=1-(1-puncor)^(1/m) (or Sidak, 1967) holm Step-down FWER Holm, 1979 holland Step-down FWER Holland and Copenhaver, 1987 liu1 Step-down FDR Benjamini and Liu, 1999a liu2 Step-down FDR Benjamini and Liu, 1999b hochberg Step-up FWER Hochberg, 1988 rom Step-up FWER Rom, 1990 simes Step-up FDR Benjamini and Hochberg, 1995 (or Benjamini and Yekutieli, 2001 (first method)) yekutieli Step-up FDR Benjamini and Yekutieli, 2001 (second method) krieger Step-up FDR Benjamini, Krieger and Yekutieli, 2001

Note that, in the case of the holland method, the procedure used is the simplified (and less powerful) version of the procedure of Holland and Copenhaver (1987), which takes no account of logical dependencies between the null hypotheses, although it takes advantage of non-negative dependencies between the P-values. The simes method is so named because it was proposed in Simes (1986), although its justification in terms of the FDR was presented in the references indicated above.

Technical note

If the user specifies method(sidak), then multproc and {cmd:smileplot) use the formula for method(bonferroni) to calculate the corrected critical P-values when the Sidak formula gives a corrected critical P-value of 0. Similarly, if the user specifies method(holland), then multproc and {cmd:smileplot) use the formula for method(holm) to calculate the corrected critical P-values when the Holland-Copenhaver formula gives a corrected critical P-value of 0. This practice works because the Sidak correction converges in ratio to the Bonferroni correction in the limit as the uncorrected P-value tends to zero. This approximation makes multproc and smileplot conservative when the uncorrected P-value is not very small and the number of comparisons is very large. However, it is less conservative than setting the corrected critical P-value to 0. This technical issue might be a reason for using the SSC package qqvalue (Newson, 2010), instead of multproc and {cmd:smileplot).

Examples

If we type the following example, which uses the auto data, then a smile plot will be produced with 1 observation per parameter of the fitted model. The corrected P-value defines an upper confidence bound for how many of these parameters are 0 in the population from which these cars were sampled.

. sysuse auto,clear . parmby "xi:regress mpg i.rep78 i.foreign",label norestore . smileplot if parm!="_cons",me(holm) ptl(label)

If we type the following example, which uses the auto data, then a pair of smile plots will be created, one for US-made cars and one for non-US cars, with one data point for each parameter of the model (other than the intercept). The corrected P-value is corrected for the total number of parameters for both car types (US and non-US). The pair of smile plots is created in two ways, first with the default options, then with a large number of non-default options specified by the scatteropts and refopts options and the twoway_options.

. sysuse auto,clear . parmby "xi:regress mpg weight i.rep78",label norestore by(foreign) . smileplot if parm!="_cons",ptl(parm) by(foreign) . smileplot if parm!="_cons",ptl(parm) scatteropts(mlabsize(medlarge)) refopts(lpattern(shortdash)) by(foreign) subtitle(,bfcolor(white)) ylabel(,axis(1) labsize(medlarge)) ylabel(,axis(2) labsize(medlarge))

The following advanced example demonstrates the use of by varlist: together with the by option of smileplot. The example assumes that there is a dataset in memory, with 1 observation per parameter estimate. The dataset contains variables or and siglev, containing estimated odds ratios and P-values respectively, and also identifier variables outcome, exposure, subset and adjusted. The program multproc is used to carry out the Simes method on each subset defined by the variable adjusted, storing the uncorrected and corrected overall critical P-values in new variables uncp and corp, and a hypothesis rejection indicator in a new variable signif. We then use smileplot to create, for each combination of values of adjusted and outcome, an array of smile plots for each value of subset, with data points labelled by the value of exposure. Finally, the rejected null hypotheses are listed.

. sort adjusted outcome subset exposure . by adjusted:multproc,pval(siglev) meth(simes) gpunc(uncp) gpcor(corp) rej(signif) . by adjusted outcome:smileplot,est(or) pval(siglev) punc(uncp) pcor(corp) by(subset) ptl(exposure) xlog t1(" ") . by adjusted outcome:list if signif,nodisp

Saved results

multproc and smileplot save the following results in r():

Scalars r(puncor) uncorrected critical P-value r(pcor) corrected critical P-value r(npvalues) number of P-values r(nreject) number of P-values rejected

Macros r(method) the method() option

Author

Roger Newson, Imperial College London, UK. Email: r.newson@imperial.ac.uk

References

Benjamini, Y. and Y. Hochberg. 1995. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society B 57: 289-300.

Benjamini Y., A. Krieger, and D. Yekutieli. 2001. Two staged linear step-up FDR controlling procedure. Pre-publication draft downloadable from Yoav Benjamini's website at http://www.math.tau.ac.il/~ybenja/.

Benjamini, Y. and W. Liu. 1999a. A step-down multiple hypotheses testing procedure that controls the false discovery rate under independence. Journal of Statistical Planning and Inference 82: 163-170. Pre-publication draft downloadable from Yoav Benjamini's website at http://www.math.tau.ac.il/~ybenja/.

Benjamini, Y. and W. Liu. 1999b. A distribution-free multiple-test procedure that controls the false discovery rate. Report, Dept. of Statistics and OR, Tel Aviv University, RP-SOR-99-3. Pre-publication draft downloadable from Yoav Benjamini's website at http://www.math.tau.ac.il/~ybenja/.

Benjamini, Y. and D. Yekutieli. 2001. The control of the false discovery rate in multiple testing under dependency. Annals of Statistics 29: 1165-1188. Pre-publication draft downloadable from Yoav Benjamini's website at http://www.math.tau.ac.il/~ybenja/.

Hochberg, Y. 1988. A sharper Bonferroni procedure for multiple tests of significance. Biometrika 75: 800-802.

Holland, B. S. and Copenhaver, M. D. 1987. An improved sequentially rejective Bonferroni test procedure. Biometrics 43: 417-423.

Holm, S. 1979. A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics 6: 65-70.

Newson, R. B. 2010. Frequentist q-values for multiple-test procedures. The Stata Journal 10(4): 568-584. Download from The Stata Journal website.

Newson, R. and the ALSPAC Study Team. 2003. Multiple-test procedures and smile plots. The Stata Journal 3(2): 109-132. Download from The Stata Journal website.

Rom, D. M. 1990. A sequentially rejective test procedure based on a modified Bonferroni inequality. Biometrika 77: 663-665.

Sidak, Z. 1967. Rectangular confidence regions for the means of multivariate normal distributions. Journal of the American Statistical Association 62: 626-633.

Simes, R. J. 1986. An improved Bonferroni procedure for multiple tests of significance. Biometrika 73: 751-754.

Wright, S. P. 1992. Adjusted P-values for simultaneous inference. Biometrics 48: 1005-1013.

Also see

Manual: [R] by, [R] statsby, [G] symbol, [G] graph, [G] graph options. On-line: help for by, statsby, postfile, graph, graph_twoway help for smileplot7, parmby, parmest, qqvalue if installed