The six cities air pollution is used to estimate and investigate the marginal curve of a function describing lung growth for set of children in a longitudinal study. This article proposes penalized regression spline technqiue based ona semiparametric mixed models (MM) framework for an additive model. This smoothing approach fits marginal models for longitudinal unbalanced measurements by using a Bayesian inference approach, implemented using a Markov chain Monte Carlo approach with the Gibbs sampler. The unbalanced case in which missing or different number of measurements for a set of subjects is more practical and common in real life studies. This methodology makes it possible to establish a straightforward approach to similar models using R programming, when it is not possible to do so using existing codes.
"Longitudinal studies, where data is collected by measuring the same experimental units several times over a relatively long period, are becoming increasingly common. Conventional statistical approaches have limitations when applied to the analysis of longitudinal data ... Practical limitations of longitudinal analysis that relate to missing data and large data set sizes were explored in this thesis with the application of a sampling technique known as Ranked Set Sampling (RSS). We developed this sampling method, which has not previously been applied to longitudinal data, for fixed and mixed-effects models. This thesis also illustrated inference techniques to estimate these models after selecting sample units by RSS."