We are having a journal club reading Diggle et all, Analysis of Longitudinal Data.
In there a parametric covariance structure is discussed having a sum of three covariance parts per subject:
- Random effect (my)
- Serial (auto)correlation (rho, thau)
- Measurement error (sigma)
One code example using mixed regression is (dataset attached):
Code:
cls use milk.dta, clear generate week_b1 = cond(week <= 3, week, 3) mixed protein bn.diet c.week_b1, nocons ||cow:, residuals(ar 1, t(week)) reml nolog
Code:
------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ cow: Identity | var(_cons) | 0.020 0.006 0.011 0.034 -----------------------------+------------------------------------------------ Residual: AR(1) | rho | 0.548 0.030 0.486 0.605 var(e) | 0.076 0.005 0.067 0.086 ------------------------------------------------------------------------------
Does anyone know if it is possible to have the three separate components in Stata?
If so how can it be done?
Looking forward to hear from you
0 Response to Howto build a covariance structure
Post a Comment