Inspired by Joseph Coveney's solution, here's some code that converts
all variable and value labels to proper case. It still does not work
with things like "1st quintile" but it's saves a lot of work.
foreach var of varlist _all {;
local variable_label : variable label `var';
local variable_label = subinstr(proper("`variable_label '"),"'S", "'s", .);
label variable `var' "`variable_label'";
if "`:value label `var''" != "" {;
qui label list `var';
forvalues i=`r(min)'/`r(max)' {;
if "`:label `var' `i', strict'"!="" {;
local vl "`:label `var' `i', strict'";
local vl = subinstr(proper("`vl'"), "'S", "'s",.);
label define `:value label `var'' `i' "`vl'", modify;
};
};
};
};
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/