Hello, I have an unbalanced panel data set that looks like: ID,YEAR,HEIGHT Tom,2007,65 Tom,2008,66 Mary,2007,45 Mary,2008,50 Harry,2007,62 Harry,2008,62 James,2007,68 Jack,2007,70 Jordan,2008,72
That is, James, Jack, and Jordan are missing a YEAR. Is there any command that will "fill in" the missing YEAR such that the end result will be balanced and look like: ID,YEAR,HEIGHT Tom,2007,65 Tom,2008,66 Mary,2007,45 Mary,2008,50 Harry,2007,62 Harry,2008,62 James,2007,68 James,2008,NA Jack,2007,70 Jack,2008,NA Jordan,2007,NA Jordan,2008,72 Thank you. Geoff -- Geoffrey Smith Visiting Assistant Professor Department of Finance W. P. Carey School of Business Arizona State University [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.