Re: Constraining variances in asreml-R

From: Butler, David <David.Butler_at_DPI.QLD.GOV.AU>
Date: Wed, 25 Mar 2009 10:04:09 +1000

Most variance models have an "init" argument to take a vector of initial values as per your code. This vector can have a 'names' attribute where the names of the elements can be "P","U" or "F" for positive, unconstrained or fixed. So,
myInit <- c(in3,in4)
names(myInit) <- c("P","F")
should do the trick.


From: ASReml users discussion group [mailto:ASREML-L_at_DPI.NSW.GOV.AU] On Behalf Of zentree
Sent: Tuesday, 24 March 2009 8:25 PM
Subject: Constraining variances in asreml-R


I am comparing different methodologies for MET and in one of them I am running all the pairs of bivariate analyses for 70 sites, which means an awful lot of analyses. I wrote an R script that first run all the univariate analyses (fitting models appropriate for each site), stores the variance components and then I can use those components as starting values for the pairs.

My problem starts in that I would, sometimes, like to constraint one of the variances to a given value. For example, for some pairs I would like to constrain in4 to 0.01 (or something very small). Is there a simple way to fix in4 to 0.01?

Code: <- asreml(cbind(dbh1,dbh2) ~ trait,
                         random = ~ Rep:diag(trait,init=c(in1,in2)) +
                         Rep:Sets:diag(trait,init=c(in3,in4)) +
                         data = cur,
                         rcov = ~ units:diag(trait,init=c(in8,in9)))

In plain vanilla ASReml I would use something like !GF. Can I do that in asreml-R without recurring to manually edit a starting values external file? Remember, I have to run this code over 2,000 times.


Sacred cows make the best hamburger—Mark Twain.

-------------------- m2f --------------------

Sent using Mail2Forum (

Read this topic online here:

-------------------- m2f --------------------

This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of their organisation.
The information contained in the above e-mail message or messages
(which includes any attachments) is confidential and may be legally
privileged. It is intended only for the use of the person or entity
to which it is addressed. If you are not the addressee any form of
disclosure, copying, modification, distribution or any action taken
or omitted in reliance on the information is unauthorised. Opinions
contained in the message(s) do not necessarily reflect the opinions
of the Queensland Government and its authorities. If you received
this communication in error, please notify the sender immediately
and delete it from your computer system network.
Received on Thu Mar 25 2009 - 10:04:09 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.)