Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Generating new variables with values of difference in 2 variables


From   Hitesh Chandwani <[email protected]>
To   [email protected]
Subject   st: Generating new variables with values of difference in 2 variables
Date   Wed, 18 Apr 2012 10:59:09 -0500

Hello all,

This is another query about loops. I have 8 variables day1-day8. I am
trying to run a loop that does:

gen var1=day2-day1
gen var2=day3-day2
gen var3=day4-day3...and so on.



© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index