Hello,
I have one of the variables G1 which has values from 1 to 17.
Then I want to make a loop as below,but it didn't work out.
Anyone can help what is the problem? thanks in advance.
foreach i in G1 {
sum sw20h if G1==`i'
global Ng`i'=r(sum)
}
Related Posts with making loop with the values within the variable
Split string variableHi everyone, I have a string var and I would like to split that var to get the last part of the str…
Fama French regression estimating excess returnDear Statalisters, I am new to the topic Stata, and have a rather simple question, unfortunately I …
Question about estpost/esttab: Control decimals per variable in summary tableCross post at: https://stackoverflow.com/questions/...-summary-table I am trying to get a summary …
Stata Twoway bar plots - different bar gapsHello! Can someone help me figure out how can I have a twoway bar plot with different bar gaps, i.e…
Immediate form of paired t-testHi! Is there an immediate form of paired t-test in stata? Thank you in advance. …
Subscribe to:
Post Comments (Atom)
0 Response to making loop with the values within the variable
Post a Comment