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 ?
Marking Answer Sheets using STATAI am trying to find a quicker way to mark answer sheets using stata (over 500 answer sheets with eac…
How to make this graph with stack option?Dear all, I would like to make a graph as shown below. In my simple example, I calculated concentra…
collinearity diagnostics for ordered logistic regressionDear researchers, I am trying to get the VIF after running the xtologit but it doesn't work with me…
pweight not allowed - helpHello, I am trying to use the pweight subcommand, but I am getting the error that it isn't allowed. …
overlapping graph lines are obscuredHi there I would like to plot multiple lines on a graph, but often these lines overlap, in which ca…
Subscribe to:
Post Comments (Atom)
0 Response to How to jump out a forvalue loop after finding a specific value ?
Post a Comment