Robertson wrote:Hello
I have age (a) and sex (x) as individual covariates in my data set. Is it possible to enter interactions between covariates and how do you enter the interaction in the design matrix?
Thank you
Sandi
Presumably, you mean 'age at marking', and not 'age at a particular encounter time'. If the former, then 'yes' - by simply using the product of the dummy coding for age (e.g., 0 - marked as yourng, 1 - marked as adults), and the covariate.
But, while coding age as an individual covariate is convenient (since you don't have to play with the PIMs for certain analyses), its ultimately limiting, since you won't be able to deal with young versus adult differences among individuals marked as young, in any way that lets you compare adult survival among individuals as a function of the age at which they were marked. A lot of folks assume that adult survival is independent of age of marking. Bad assumption...more often than not, I've found estimates of adult apparent survival differ as a function of the age of marking.
As such, I generally prefer (recommend) dealing with age using an underlying PIM structure, rather than as individual covariates - covered in considerable detail in chapter 8.