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?
Smr - observed and expected What is the best way to show the difference between observed and expected in graphic form? I USE th…
Merge and create new variable for the non-matching observationsHi all, I was wondering if there is a way to merge identical observations & then create a new va…
New ML package: pystacked for Stacking Regression and ClassificationI am happy to announce a new Stata package which I wrote together with Mark Schaffer and Chris Hanse…
margins after logitDear All, I think this point was addessed in the forum but I was not able to find anything. Suppose…
Counting the number of values (that are not missing values)Hello! I want to make a variable based on other variables. The value of the variable would be the n…
Subscribe to:
Post Comments (Atom)
0 Response to How to write a more efficient code calculating a weighted index?
Post a Comment