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
‘Or’ condition for time dummiesHi, I have a question about time dummies. Is it possible to have an ‘or’ condition for a time dummy…
Synth control method not matchingArray Hello, I have completed making a synthetic control method model of Russia after the interven…
loopsHi, I am trying to look at a range of numbers in a loop but am having difficulty. My data looks li…
different yline/subtitle in a by() plotHi all! I have a complicated graph that I have multiples of for different categories and would like…
Probit: Can I restrict the number of iterations?I tried this code (Y is dependent and other variables are independent): probit Y local_income_PPPX …
Subscribe to:
Post Comments (Atom)
0 Response to creating variables in forval numeric forloop
Post a Comment