------------------------------------------------------------------------------- help forbmjcip(Roger Newson) -------------------------------------------------------------------------------

Format confidence intervals and P-values for medical journals

bmjcipestvarnameciminvarnamecimaxvarname[pvarname] [ ,cformat(%fmt)]where

estvarname,ciminvarname,cimaxvarnameandpvarnameare numeric variable names, and%fmtis a numeric display format.

Description

bmjcipreformats a list of numeric variables, containing estimates, confidence limits and (optionally)P-values, to string variables, containing the same values formatted for presentation in medical journals. The new string variables replace the old numeric variables, and have the same names, variable labels, and positions in the dataset.bmjcipis usually used in output datasets (or resultssets) produced by theparmestpackage, and the reformatted string variables are later output using thelisttexpackage for input to Microsoft Word. It requires thesdecodepackage in order to work. Thesdecode,parmestandlisttexpackages can all be downloaded from SSC.

Options

cformat(%fmt)specifies a display format, used for the estimates and confidence limits. However,bmjcipalso adds parentheses and commas to the confidence limits, as expected by medical journals. TheP-value is formatted using a separate rule, not corresponding exactly to any Stata display format. (SeeRemarksbelow.)

RemarksGuidelines for presentation of confidence intervals in medical journals is given in Altman

et al.(2000). The namebmjcipwas chosen because these guidelines were written originally for the British Medical Journal (BMJ) group of journals.The presentation of

P-values is still subject to some controversy, even among statisticians. However,bmjcippresents aP-value of 1 as 1.0, aP-value less than 1 and no less than .00001 as a left-justified decimal number with no zero before the decimal point, and aP-value below 0.00001 and greater than 0 in the formatx.yx10-z(wherexandyare digits andzis an integer), and aP-value of 0 as 0. Note that, if theP-values are output bylisttexand converted into Microsoft Word tables, then the user must convert each "-z" to a superscript by hand.If the user wishes to keep the original numeric variables, then the user may use

clonevarto make new numeric variables that are copies of the original variables, and then reformat these to string variables usingbmjcip.

bmjcipis not a satisfactory long-term solution to the problem of formatting confidence intervals andP-values. However, most medical sector scientists want to publish tables in the BMJ and other medical periodicals without waiting for such a solution.

Examples

. bmjcip estimate min95 max95 p

. bmjcip estimate min95 max95 p, cformat(%10.3f)

. bmjcip estimate min95 max95, cf(%10.1f)

AuthorRoger Newson, National Heart and Lung Institute, Imperial College London, UK. Email: r.newson@imperial.ac.uk

ReferencesAltman, D. G., D. Machin, T. N Bryant and M. J Gardner. 2000.

Statistics with Confidence. 2nd ed. London, UK: British Medical Journal.

Also seeManual:

[D] destring,[D] clonevar,[D] formatOn-line: help fortostring,destring,clonevar,formathelp forsdecode,parmest,listtexif installed