..-
help for ^gmci^ (STB-??)
..-
Geometric means and confidence intervals
- ----------------------------------------
^gmci^ varlist [weight] [^if^ exp] [^in^ range ] [^, l^evel(#) ^a^dd(#)
^o^nly]
^aweights^ and ^fweights^ are allowed; see help for @weights@
Calculates ^geometric means^, and level-specified ^confidence intervals^,
for one, or several variables at a time.
Options
- -------
^l^evel(#) allows the specification of the desired confidence interval
level. When specified, the level parameter, ^#^, ^must be an integer
from 10 to 99^.
The default value is ^95^ (%).
^a^dd(#) allows a specified value to be added to all variables in varlist
prior
to calculating the geometric mean and confidence interval. This is handy
when there are nonpositive values.
^o^nly has no effect unless the -add- option is used. When both options
are specified,
the -add- option will only be applied to variables that have
nonpositive values.
Saved results
- -------------
The command stores the following statistics in global macros:
^S_1^ - number of observations
^S_3^ - geometric mean
^S_5^ - lower bound of confidence interval
^S_6^ - upper bound of confidence interval
N.B.: when several variables are specified in a single command line, the
above macros retain the values for the ^last^ variable ^in the list^.
Authors
- -------
John Carlin
Suzanna Vidmar
(Royal Children's Hospital and University of Melbourne,
Melbourne, Australia)
Carlos Ramalheira
(Coimbra University Hospital, Coimbra, Portugal)
Based on original contributions by
William Gould and Nick Cox .