Hello,
I am looking at childless men in the UK and I am using panel data which has 9 waves. childlessness is defined as not having a biological children at age (x). I need to create the dependent variable which is (childless) and that is those men who have not had a biological child by age x. one way to get the age cut off is to look at the age of first child and then deiced the age cut off of childlessness.
I have my panel as this
wave pidp (individual id) hidp (household id) (varlist)
I have these variables in my dataset:
year of first child
fathers'birthday
men
I did this command:
gen ageatfirst= year of first child -fathers'birthday
i think I need to use the hidp to do this command is that right? any advice please
Related Posts with age at first child
Adding fixed effects in esttab using estaddHi all, I've run a few regressions and am trying to add rows indicating the presence of fixed effec…
How to replace any variable's value if meeting certain conditionDear Stata users, In the following data, I want to replace variables d2a1 d2a2 d2a3 to missing 'cau…
Interpreting stata output with log dependent variable and % independent variablesHello stata users, Hope you are doing well. I have a question regarding interpreting stata output i…
How to re-arrange my data?Dear Statalists, I'd like to rearrange my data in order to analyze it. Part of my dataset is: Co…
Using substring functions in Stata 16.1Dear Statalist, I have a string variable "comment" stored as "strL" that contains a mix of numbers…
Subscribe to:
Post Comments (Atom)
0 Response to age at first child
Post a Comment