Question

Status:Closed    Asked:Jul 24, 2016 - 04:34 PM

Are the variable names in the Stata .dta file upper case or lower case?

Dear Folks--

The IPUMS-CPS variable names as they appear on the IPUMS-CPS web pages, in the .dat fixed-width files, in the .csv files, in the codebook, and in the xtml documentation are upper case. The variable names as they appear in the Stata .do file are lower case.

The R package "haven" converts .dta files to R data frames. R is case sensitive: HHINCOME does not equal hhincome. The variable names in the data frame as it emerges from haven are lower case. Is that because haven is converting them to lower case? (It shouldn't). Or is it because you are sending the .dta files out with a different case than other files? And if the latter, was that intentional (and if so, why?) or unintensional (and if so, will you be changing it any time soon?).

Warmest regards, Andrew

 
Do you have the same question? Follow this Question
 

Staff Answer

avatar

Joe_Grover

Staff

The lowercase variable names in Stata extracts and syntax files is intentional. This is because the Stata convention is to name variables using all lowercase characters. While this is not enforced by the Stata program it is common practice among most users so this is what we support.

I hope this helps.

 

Jul 25, 2016 - 02:10 PM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

How do I find the data file:Ipumsi_00001.dat for the 1974
Just a note that the release schedule for IPUMS USA and FAQ funding are out o...
Variables from Full Year Consolidated Files currently not included in IPUMS-M...
Wrong HH weight Tanzania 2012 census?
Assign Individuals to PUMAS, append dataset
Regarding: Does CLASSWKR in ASEC before 1988 include incorporated and non-inc...
Login   |   Register

Recently Active Members

View More »

Share |