Hi,
I use the following code to calculate a weighted zipf index:
gen zipfindlight`var' = zipf13*ind13`var' + zipf14*ind14`var' + zipf15*ind15`var' + zipf17*ind17`var' + zipf18*ind18`var' + zipf19*ind19`var' + zipf20*ind20`var' + zipf21*ind21`var' + zipf22*ind22`var' + zipf23*ind23`var' + zipf24*ind24`var'
How to make it more efficient?
Thanks,
Linghui
Related Posts with How to write a more efficient code calculating a weighted index?
Lagging a variable 2 years from data on daily stock pricesHello I am trying to make an empirical study on the effect of dividend changes on future firm perfo…
How to create a loop for doing regression with multiple variables and storing each estimate with a sequential labelHi I'm new to Stata and have a question about using foreach for regression. I have A as a dependent…
Identify string as part of another stringDear statalist users, I have the following (stylized) data: Code: * Example generated by -dataex…
Calculating the Alpha for bonds panel data setHi, I am trying to calculate Jensen's alpha for a panel data set of 122 bonds with each daily obser…
modelling stated preferences for discrete choices with case sensitive variablesHi, I'm trying to model a discrete choice (4 options available to each respondent in each scenario …
Subscribe to:
Post Comments (Atom)
0 Response to How to write a more efficient code calculating a weighted index?
Post a Comment