Dear Stata Team,
I would like to construct two variables for unemployment (nun) when an individual is 16 years of age (nun_highschool) conditional on hiqual==4 and when an individual is 22 years of age (nun_uni) conditional on hiqual==1.
I would need the respective variables for a given individual over the survey years time invariant.
I hope this explanation makes sense.
I would appreciate your help.
Best,
Nico
I would like to construct two variables for unemployment (nun) when an individual is 16 years of age (nun_highschool) conditional on hiqual==4 and when an individual is 22 years of age (nun_uni) conditional on hiqual==1.
I would need the respective variables for a given individual over the survey years time invariant.
I hope this explanation makes sense.
I would appreciate your help.
Best,
Nico
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long id float(year nun age) byte hiqual 6135 1992 11.8 20 4 6135 1993 12.4 21 4 12935 1993 8 20 4 12935 1995 6.9 22 4 17015 1997 6 16 4 17015 1998 5.5 17 4 17015 2003 4.4 22 1 22445 2000 4.9 16 4 29259 1995 6.9 21 4 29259 1996 6.4 22 4 29925 1993 8 16 4 29925 1994 7.4 17 4 29925 1999 5.3 22 1 30615 1994 11.3 17 4 47619 2004 5.2 16 4 47619 2005 5.3 17 4 48303 2006 5.8 16 4 50335 1992 7.7 16 4 50335 1993 8 17 4 61215 2005 4.4 16 4 75495 1996 6.4 17 4 76165 1999 5.3 17 4 81682 1997 6 21 4 81682 1998 5.5 22 4 96575 1995 6.9 22 1 134655 2001 5.7 16 4 138055 1997 7.9 17 4 163215 1996 6.4 16 4 163215 1997 6 17 4 163899 2001 5.7 16 4 170699 1998 5.5 20 4 170699 1999 5.3 21 4 173411 1997 6 16 4 173411 1998 5.5 17 4 182255 1997 6 16 4 182255 1998 5.5 17 4 182255 2001 4.5 20 4 182255 2002 4.6 21 4 182939 2004 5.2 17 4 184965 1998 7 16 4 184965 1999 6.7 17 4 184965 2002 5.8 20 4 184965 2003 5.6 21 4 184965 2004 5.2 22 4 201295 1992 7.7 20 4 201295 1994 7.4 22 4 211491 2002 4.6 16 4 211491 2007 . 21 4 211491 2008 . 22 4 218291 1992 7.7 17 4 242775 1999 5.3 17 4 252971 1993 8 16 4 252971 1994 7.4 17 4 261125 2001 5.7 16 4 261125 2007 5.7 22 1 280165 1995 6.9 16 4 280165 1996 6.4 17 4 280165 1999 5.3 20 4 280165 2000 4.9 21 4 280859 2002 5.8 17 4 284939 1994 11.3 20 4 284939 1995 10.1 21 4 294459 1993 12.4 22 1 303299 1992 11.8 20 4 303299 1994 11.3 22 4 307375 1994 11.3 22 1 308731 1995 10.1 16 4 308731 1996 9.6 17 4 314175 1994 7.4 20 4 326423 1995 6.9 17 4 330495 1992 7.7 17 4 331179 1993 8 16 4 333205 2006 5.1 16 4 346882 2000 4.9 21 4 353615 1998 7 17 4 355655 1998 5.5 20 4 355655 1999 5.3 21 4 362459 1992 7.7 21 4 362459 1993 8 22 4 387605 2004 4.4 16 4 389651 2004 4.4 17 4 392379 1996 9.6 16 4 397135 1992 11.8 16 4 397135 1993 12.4 17 4 397135 1996 9.6 20 4 397135 1997 7.9 21 4 397135 1998 7 22 4 399859 1994 7.4 20 4 399859 1995 6.9 21 4 399859 1996 6.4 22 4 402575 1993 12.4 20 4 402575 1994 11.3 21 4 402575 1995 10.1 22 4 410735 1998 7 16 4 410735 1999 6.7 17 4 410735 2002 5.8 20 4 410735 2003 5.6 21 4 410735 2004 5.2 22 4 448135 1992 11.8 21 4 448135 1993 12.4 22 4 end label values hiqual hiqual label def hiqual 1 "Degree", modify label def hiqual 4 "GCSE etc", modify

Comment