[R-sig-ME] Complex random regression structure in ASREML-R

i white i.m.s.white at ed.ac.uk
Tue Jan 8 14:57:04 CET 2013


How about

~str(~F1:family + F1:family:time, ~us(4):id(90))

I think this will give an unstructured 4x4 for the 2 intercepts and two 
slopes. If you really want zero covariance between intercept in one 
group and slope in the other, you have to impose constraints and set 
initial values as described in the asreml-R manual.

On 01/08/2013 12:33 PM, Szymek Drobniak wrote:
> Hi all,
> I'm currently analyzing data using random regression and I'm a bit puzzled
> how to fit a more complex covariance structure. In my data I have one
> two-level fixed factor (say F1), one random effect of "family" with 90
> families and another fixed effect with 3 levels (say F2). All families have
> individuals found in all combinations of F1 and F2. I also have a
> continuous variable Time.
>
> If I get it right - the simplest random regression model would look like
> this (only the random part):
> ~str(~family+family:time, ~us(2):id(90))
>
> Also - if I understand correctly - if I wanted to add F1 to the structure I
> could fit
> ~at(F1):str(~family+family:time, ~us(2):id(90)) which would give me a
> covariance structure of (sorry for sloppy matrices, each row represents 4
> elements of a 4 rows matrix):
>
>
> V.F1a(intercept)        COV.F1a         0               0
> COV.F1a                 V.F1a(slope)    0               0
> 0                       0               V.F1b(int)      COV.F1b
> 0                       0               COV.F1b         V.F1b(slope)
>
> And now the tricky part: how I can specify that (if its possible) to
> estimate also covariances between intercepts and slopes in different F1
> groups? i.e.
>
>
> V.F1a(intercept)        COV.F1a         COV.Fab(i)      0
> COV.F1a                 V.F1a(slope)    0               COV.Fab(s)
> COV.Fab(i)              0               V.F1b(int)      COV.F1b
> 0                       COV.Fab(s)      COV.F1b         V.F1b(slope)
>
>
> Of course there's yet another level for this complexity (it's the F2 factor
> but this one could be incorporated by creating an additional F3 with levels
> being combinations of F1 and F2.
>
> Cheers,
> szymek
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the R-sig-mixed-models mailing list