Geoffrey Smith-3 wrote:
> 
> Hello, I was wondering if there was an easy way to calculate the rate of
> change in a variable for an unbalanced panel data set.  Below is a
> detailed
> description in R of what I am asking.  Thank you.  Geoff
> 
> 

A classic for mixed models, which simply does not know what  "missing data"
are (= handles those cases graciously). 

Dieter

library(nlme)
Person <- c(rep('Frank',5), rep('Tony',4), rep('Edward',4));
Year <- c(2005,2006,2007,2008,2009,2005,2006,2008,2009,2006,2007,2008,2009);
Score <- c(55,58,63,23,34,38,56,87,44,32,98,45,56);

Data <- data.frame(Person=Person, Year=Year, Score=Score);
Data;
summary(lme(Score~Year, random=~1|Person,data=Data))





--
View this message in context: 
http://r.789695.n4.nabble.com/lags-for-unbalanced-panel-data-tp3341764p3341882.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to