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

st: Changing neg into pos values

From   "Ziad El-Khatib" <>
Subject   st: Changing neg into pos values
Date   Sun, 24 Feb 2008 23:50:44 -0800

Dear STATAlister,
i have variable var1 containing both of pos or neg values, i want to
create new variable var2 equal to var1:
  to have var2=100-var1 if var1 >0
  to have var2=100 plus the positive value of var1 if var1<0 (for
example if var1= -4 then var2 would be = 100 + 4 = 104

any tips?

Thank you in advance and best regards
*   For searches and help try:

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