Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: simple scripting and formulas


From   "Friedrich Huebler" <[email protected]>
To   [email protected]
Subject   Re: st: simple scripting and formulas
Date   Sat, 3 Jan 2009 23:57:22 -0500

Allison,

Do the commands below yield the values you need?

. sum var
. gen var2 = (var-r(min))/(r(max)-r(min))

Friedrich

On Sat, Jan 3, 2009 at 7:48 PM,  <[email protected]> wrote:
> Dear all,
> I have a question about creating formulas or scripts in STATA for my panel
> data set.
> I wish to normalise my panel data using the following formula:
> Vi-Vmin/Vmax-Vmin (where Vi is the actual value of a variable, Vmax is the
> manimum value in a complete data series, and Vmin is the minimum). How do I
> generate a new list of variables using this formula?
> Any help would be appreciated.
> Allison
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index