Hello,
I have recently started learning Stata and have been playing around with data sets. The observations in the data I am using come from the UK Labour Force Survey. Here are the key variables I am working with:
GRSSWK – Gross weekly pay in the respondent’s main job, in pounds Sterling
SEX – The respondent’s reported gender, with 1 = male, 2 = female, −8 = no answer and −9 =does not apply
CONMON – The month the respondent started her current job
CONMPY – The year the respondent started her current job
I am trying to figure out whether the gender wage gap shrunk in Q2 2018 relative to before the regulation’s implementation? Using Q1 2018 as a comparison group.
How do I create a dummy variable which will categorise each quarter of the year. I tried this:
generate FirstQuarter = CONMON==January,Feburary,March,April
Error - January not found
I have also tried:
generate FirstQuarter = 0
replace FirstQuarter = 1 if CONMON="Janurary"
Error - invalid syntax
January is not a variable but a result. What would be the correct code?
I have found that using numbers works such as:
generate YEAR2017 = CONMPY==2017
Apologise for the basic question and thank you for your time.
Related Posts with Dummy Variables - New to Stata - Gender pay-gap policy
Principal component analysis with dummy variables as its indicatorsHi all. I am currently doing research where I need to generate a latent variable. I have read some m…
Error while using import command (quotations accepted by a Mac and not accepted by another Mac)Hi, I'm new in the Forum but I used Stata in the past while being a RA (and coming back again now). …
imputing missing values based on categories of other variables level typeofA typeofB typeofC var A x . . . A y . . 55 B . p . 10.5 B . q . . B . r . …
Is it possible to fit a mprobit model using gsemDear all, I know that gsem allows only the logit link for the multinomial response variable, but in…
Outreg 2 not showing correct coefficientsHello Everyone, I have run the following probit regression: Code: probit vocationaltraining hhsize…
Subscribe to:
Post Comments (Atom)
0 Response to Dummy Variables - New to Stata - Gender pay-gap policy
Post a Comment