Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Rescaling variable


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: Rescaling variable
Date   Thu, 9 Mar 2006 15:34:00 +0100

Cornelia Schmidt wrote:
> I would like to rescale a variable from (-10 to 10) to (0-10). Does anybody
> know how this works?

. gen newvar = (oldvar + 10)/20 * 10 

-- 
[email protected]
+49 (030) 25491-361
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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