Re: Bivariate random regressions

From: <arthur.gilmour_at_DPI.NSW.GOV.AU>
Date: Mon, 26 Feb 2007 11:38:19 +1100

Dear Matt,

I insert after **AG my comments intop your email.

I wish to run a bivariate animal model and then build this up into a
bivariate random regression and I was hoping for some help.

I want to model how two traits covary firstly phenotypically and then
dividing phenotypic variance into additive and residual components.

So as an example I can run random regressions each trait in this way:

ANIMAL !P # pedigree factor, refers to pedigree file
INC # horn increment growth in sheep
AGE !A # age as a factor in years 1-5

**AG Using !A on AGE and sAge is unsafe as !A causes the data values to
be treated
purely as labels and codes them in the order they appear in the data file.
I gather the years are coded in the data as 1, 2, 3, 4, 5
  so AGE *
  or AGE !L 1998 1999 2000 2001 2003 #(Assuming 1..5 relates to years
is safer.

sAGE !A # standardized age (-1 to 1)

**AG sAGE does not actually need to be supplied given ordered levels of
      but as it is, it should be given without any qualifiers, so it is
treated as a
      covariate (and in particular, is not recoded )

CYR !A # year of measurement to control for
                         # environmental effects during the year of growth
WEIGHT # weight of the sheep measured in

Sheep1.ped !ALPHA !MAKE !SKIP 1
incNHMalesrr.asd !SKIP 1 !DOPART 1 !MAXIT 100


INC ~ mu AGE CYR !f mv

1 2 0 !STEP 0.01


!PVAL sAGE -1 -0.5 0 0.5 1

INC ~ mu AGE CYR !r leg(sAGE,2).ANIMAL !f mv

1 2 1 !STEP 0.01


leg(sAGE,2).ANIMAL 2
leg(sAGE,2) 0 US
0 0.1
0 0 0.1

The first part gives me phenotypic correlations and covariances for
horn growth and the second part then breaks this down into additive and
residual components using a second order polynomial.

I know the methodology for running a bivariate model:


INC WEIGHT ~ Trait Trait.AGE !r Trait.ANIMAL

1 2 1

Trait 0 US

Trait.ANIMAL 2
Trait 0 US

However I have no idea how to merge the analysis methods and seperate
both the variances and covariances into the five age groups which I
have. This would be important to me as I want to look at how early
investment in in weight and horn growth affect later trait development
and whether there's any evidence of changing phenotypic, and genetic
correlations with age.

**AG OK,
First, with just 5 ages, it is likely that the quadratic component may not
exist, so the first requirement
is to fit your PART 2 to both traits univariately, to ensure there is
variance present.

Then the extension of part 2 to bivariate (one of several ways of doing
it) is given by


INC WEIGHT ~ Trait Trait.AGE !r Trait.leg(sAge,2).ANIMAL

1 2 1
Trait 0 US

Trait.leg(sAge,2).ANIMAL 2
6 0 US !GP # replace zeros with initial values from univariate runs

0 #Trait 1 intercept
0 0 #Trait 1 slope
0 0 0 #Trait 1 quadratic
0 0 0 0 #Trait 2 intercept
0 0 0 0 0 #Trait 2 slope
0 0 0 0 0 0 #Trait 2 quadratic


You can use the univariate analyses to provide some of these initial
values directly.
Work the otheres out roughly using the error correlation from part 3 to
work out the covariances.

Depending on the amount of data, you will probably find it difficult to
get a positive definite
solution here. I would attempt a linear random regression first.

It may be necessary to change to using an factor analytic formulation
instead of UnStructured, which is also more difficult.

A philosophical issue with this model is that it allows for different
variances at the different ages but does not allow for different residual
This is likely to bias the genetic values. So, the model
needs to be extended, maybe by adding
Trait.leg(sAge,2).ide(ANIMAL) or
with appropriate structures.

or splitting the R structure into 5 components (one for each age, assuming
data sorted on AGE)

May you know Jesus Christ and His blessing in 2007,

Arthur Gilmour, His servant .

PS My Mixed Model Regression Mapping paper is now available at

Personal website:,
Principal Research Scientist (Biometrics)
NSW Department of Primary Industries
Orange Agricultural Institute, Forest Rd, ORANGE, 2800, AUSTRALIA

fax: 02 6391 3899; 02 6391 3922 Australia +61
telephone work: 02 6391 3815; home: 02 6364 3288; mobile: 0438 251 426

ASREML 2 is now available from
The ASReml discussion group is at
To join it,

Proposed travel:
ASReml workshop (Forestry) 16-18 April Tasmania
Biom Brch meet 2-4 May
ASReml workshop (Animal Breeding) 8-26 May South Africa
AAABG 24-26 September Armidale

This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient or
received it in error, please delete the message and notify sender. Views
expressed are those of the individual sender and are not necessarily the
views of their organisation.
Received on Fri Feb 26 2007 - 11:38:19 EST

This webpage is part of the ASReml-l discussion list archives 2004-2010. More information on ASReml can be found at the VSN website. This discussion list is now deprecated - please use the VSN forum for discussion on ASReml. (These online archives were generated using the hypermail package.)