Hi all,
I wanr to create variables in a forval numeric forloop
forval i = -7(1)7{
gen dummy_`i' = 1 if dif>`i'-1 & dif<`i'+1
}
however this syntax is invalid. What can I do?
Thank you for your help!!
Related Posts with creating variables in forval numeric forloop
create utf-8 xml file with tabmultHi everyone, I create a .xml file with various sheets which I later on open in Excel. One sheet has…
Add missing valuesHello, I have the following dataset: Code: * Example generated by -dataex-. To install: ssc inst…
how do do a rolling WLS in stataI would like to run a rolling regression in Stata, where in each window the weights of independent v…
How to use the egen command and not set missing to zeroHi Statalist, I am using the egen rowlast command to tell me the depression scores for patients in …
How to run a regression using weight by the number of children to each parentDear all, I want to examine the effects of children' s characteristics on their parent health outco…
Subscribe to:
Post Comments (Atom)
0 Response to creating variables in forval numeric forloop
Post a Comment