{smcl}
{.-}
help for {cmd:explist} {right:(Roger Newson)}
{.-}


{title:Creating exponential lists of numbers}

{p 8 27}
{cmd:explist} {it:number_list} [ {cmd:,} {cmdab:b:ase}{cmd:(}{it:#}{cmd:)} {cmdab:s:cale}{cmd:(}{it:#}{cmd:)}
  {cmdab:g:lobal}{cmd:(}{it:global_macro_name}{cmd:)} {cmdab:n:oisily} ]

{p}
where {it:number_list} is either a Stata {it:numlist} containing no commas or a Stata {it:numlist}
surrounded by quotes.


{title:Description}

{p}
{cmd:explist} takes, as input, a list of numbers {it:x_1, ... , x_n}. It creates, as output,
a list of numbers {it:y_1, ... , y_n}, derived exponentially from the input list, so that, for each {it:i},

{p}
{it:y_i = scale*base^x_i}

{p}
where {it:base} and {it:scale} are numbers given by the options of the same name.
The output list is returned in the local result {hi:r(explist)}, and may also be
saved in a global macro and/or printed.


{title:Options}

{p 0 4}
{cmd:base}{cmd:(}{it:#}{cmd:)} is the logarithmic base for calculating the output list. If
absent, it is set to 10.

{p 0 4}
{cmd:scale}{cmd:(}{it:#}{cmd:)} is a scale factor for calculating the output list. If absent,
it is set to 1.

{p 0 4}
{cmd:global}{cmd:(}{it:global_macro_name}{cmd:)} is the name of a global macro, in which the
output list will be stored.

{p 0 4}
{cmd:noisily} specifies that the output list must be printed.


{title:Remarks}

{p 0 0}
{cmd:explist} is designed in a style similar to Nick Cox's {help listutil} utilities for
processing lists.


{title:Examples}

{p 8 16}{inp:. explist 0(1)20}{p_end}

{p 8 16}{inp:. explist 0(1)20,sc(2.5) noi}{p_end}

{p 8 16}{inp:. explist 0(5)50,base(2) noi}{p_end}

{p 8 16}{inp:. explist 0(-1)-20,g(powers)}{p_end}
{p 8 16}{inp:. grap y x,ylog ylab($powers)}{p_end}


{title:Author}

{p}
Roger Newson, King's College, London, UK.
Email: {hi:roger.newson@kcl.ac.uk}


{title:Also see}

{p 0 21}
{bind: }Manual:  {hi:[P] numlist}.
{p_end}
{p 0 21}
On-line:   help for {help nlist}, {help numlist}
{p_end}
{p 10 21}
help for {help listutil} if installed

