Stata version 9 includes the new command xtmixed, for fitting linear mixed models. Mixed models contain both fixed and random effects. The fixed effects are analagous to standard regression coefficients and are estimated directly. The random effects are not directly estimated but are summarized according to the unique elements of their respective variance–covariance matrices, known as variance components. xtmixed syntax is summarized and demonstrated with several examples. Also, xtmixed and its postestimation routines may be used to perform nonparametric smoothing by means of penalized splines.