cd "C:\Users\GagaLee\Desktop\ga"
local ff : dir . files "*.dta"
dis `"`ff'"'
mat ga=J(48,2,.)
local x=1
foreach i of local ff {
use `i'
local N=_N
forvalue a=1(1)`N'{
sum vo2_2 if inrange(_n,`a',(`a'+30))
local xxx=r(sd)/r(mean)
mat ga[`x',1]=`a' if inrange(`xxx',0,0.15)
mat ga[`x',2]=r(mean) if inrange(`xxx',0,0.15)
if inrange(`xxx',0,0.15) break
}
local ++x
}
Related Posts with How to jump out a forvalue loop after finding a specific value ?
newey2 with forceHello, I am working with a very unbalanced panel data set, where my id variable is an individual, an…
** New on Github ** sfv: Dofile backup/versioning programHi all I made a program in Powershell that makes it easy to keep multiple versions of dofiles. It i…
Nested Logit - sequential EstimationDear all, I'm trying to estimate a nested logit myself. Due to the computational burden of the esti…
Accidentally saved as txt fileHello I imported a txt file and then accidentally overwrote it as a txt file. I did not change any o…
Help with tabout of variables with multiple values and with decimal place?Hello, I am writing to see if someone would be able to assist me with using tabout to export tabulat…
Subscribe to:
Post Comments (Atom)
0 Response to How to jump out a forvalue loop after finding a specific value ?
Post a Comment