Hi,
I have a question, why the next sintaxis(with conditions) is not possible?
foreach i of numlist 1/30{
gen brd1=c if i>10
gen brd2=c if i>15
gen brd3=c if i>25
gen brd4=c if i>30
}
When I run "brd1" the values are between 1/30, and I want values between 1/10.
Thanks for your help.
S.
Related Posts with Generate vars with conditions inside a loop
Egen .. Group FunctionHello, I have a basic question about what egen and its group function is supposed to do. does it ad…
Remove duplicate observationsHi all, I use data from the American Housing Survey and I have the following issue with preparing t…
Dummy Variable and DateI have a dataset that has quit date in %td (DMY) format. I also have two other variables that provid…
Interpret resultsHi, I am quite new in regression, still trying to learn. Initially, i use five independent variables…
Non stationary data transformation questionSo I have some panel data, investment in different regions over the course of a 7 years. It's non st…
Subscribe to:
Post Comments (Atom)
0 Response to Generate vars with conditions inside a loop
Post a Comment