Hello,
I'm working with admin data where one of my variables (Item Category) contains embedded blanks for one particular group (Children), but only before a certain year (2005). Here is an example of my data:
How do I standardise the embedded blanks according to Item Number which are matched for Children from 2005 on, and for adults for all years? I'm unable to transform the embedded blanks at all, let alone to standardise them as I would like. I first thought that the reason they don't behave like regular empty strings or missing observations is due to their type, but after playing around with that I'm still no closer to resolving things. Any help is appreciated.
Matt
I'm working with admin data where one of my variables (Item Category) contains embedded blanks for one particular group (Children), but only before a certain year (2005). Here is an example of my data:
ID | Year | Child | Item number | Item Category |
001 | 2000 | N | 1 | a |
002 | 2000 | Y | 1 | |
001 | 2001 | N | 2 | a |
002 | 2001 | Y | 2 | |
001 | 2002 | N | 3 | b |
002 | 2002 | Y | 3 | |
001 | 2003 | N | 4 | b |
002 | 2003 | Y | 4 | |
001 | 2004 | N | 5 | c |
002 | 2004 | Y | 5 | |
001 | 2005 | N | 1 | a |
002 | 2005 | Y | 1 | a |
001 | 2006 | N | 2 | a |
002 | 2006 | Y | 2 | a |
001 | 2007 | N | 3 | b |
002 | 2007 | Y | 3 | b |
001 | 2008 | N | 4 | b |
002 | 2008 | Y | 4 | b |
001 | 2009 | N | 5 | c |
002 | 2009 | Y | 5 | c |
How do I standardise the embedded blanks according to Item Number which are matched for Children from 2005 on, and for adults for all years? I'm unable to transform the embedded blanks at all, let alone to standardise them as I would like. I first thought that the reason they don't behave like regular empty strings or missing observations is due to their type, but after playing around with that I'm still no closer to resolving things. Any help is appreciated.
Matt
Comment