Question
Generate a new variable equal to the natural logarithm of variable wage, and call this new variable lwage. What is the sample mean log-wage (lwage)
Generate a new variable equal to the natural logarithm of variable wage, and call this new variable lwage. What is the sample mean log-wage (lwage) for nonblack men? for black men? Hint 1: You did something like this in the first problem set. To generate variable lwage type the following command in Stata: gen lwage = log(wage). To obtain the sample mean log wages for black and nonblack men type, use the Stata "sum" command along with an "if" condition, once for black men, and a second time for nonblack men. For black men, the command is: sum var1 if var2==1, where var1 is lwage and var2 is black. For nonblack men, the command is: sum var1 if var2==0, where var1 is lwage and var2 is black. Hint 2: A faster way to do it is to type: tab black, sum(lwage)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started