Dear all,
First, I would like to thank you for your immense work. My question is about a frequent topic which I am not able to solve - even after hours of search in the mailing lisy. I would like to analyse random-effects (and fixed-effects)models of longitudinal / panel data with sampling weights. I have an unbalanced panel of different individuals in 5 years and income data as well as their age and I would like to analyse age-earnings profiles with longitudinal data to controll for cohort effects. In an earlier post Millo Giovanni kindly helped and said that this is not possible to use weights in the plm package. He suggested to apply a pre-treatment to the data but I wanted to try the existing packages in R first. So next, I tried the lme4 package but it seems to be the case that the weighting function in lmer does not work. This has been discussed several times in the mailing list and I cannot discern any effect of adding weights to lmer too. Next, I tried to work with the nlme package but I have some problems with the structure of the package. I ran un-weighted random-effects regressions and I read about the varFunc objects but I really stuck here. I would like to ask you if you could help me briefly. How can use the weighting function in the lme function for my purpose? My variables are id for each individual, year, age (and age squared to age quartic) and (to begin with) constant weights for each individual. I would prefer to use yearly changing weights per individual to capture better attrition. Do my weights have to be constant in nlme for every individual (just as in xtreg in Stata)? My main variables: id year income age cross-sectional weight longitudinal weight Are you aware of any other packages in R which provide the opportunity to examine longitudinal data with sample weights? Kind regards, Arne [[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.