Logarithmic transformation

Do you want to take the natural logarithm of a variable (log transformation) and create a new variable?

Practical example

Dataset
StataData1.dta
Variable namegpa
Variable labelGrade point average (Age 15, Year 1985)
Value labelsN/A
gen gpa_log=ln(gpa)

In Stata, it works exactly the same if you replace “ln” with “log”.

Note
The command is ln (lower-case L, not upper-case i).
browse gpa gpa_log