Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65231

How to change numeric label to variable name?

$
0
0
Hi, everyone.

I got population data from World Bank, but I couldn't set variables name of year. Maybe I guess Stata doesn't permit to use numeric variables on first character.

Anyway,
The World Bank data form is as follows. Array

So, I imported it into Stata.
Syntax is ". import exc population, cellrange(A4) firstrow" Array

But, as you can see, the name of variables were imported just alphabet.

I want to change alphabet to combined form Indicator Code(SP.POP.TOTL) and Year(1960~).
I know Stata doesn't allow to use period like "SP.POP.TOTL1960" in variables empirically. So, I want to make "SPPOPTOTL1960, SPPOPTOTL1961, ..." of every year variables.

I can solve these problems by using Excel, but I need Stata code because I have also another data not only population data.

Thank you for your help! :D

Inho Lee

Viewing all articles
Browse latest Browse all 65231

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>