Documentos de Académico
Documentos de Profesional
Documentos de Cultura
id=30234107
Red de Revistas Cientficas de Amrica Latina, el Caribe, Espaa y Portugal
Sistema de Informacin Cientfica
Jos A Cadena Meneses, Alberto Castillo Morales
Una comparacin de SAS y Harvey en la estimacin de componentes de varianza en modelos mixtos
Agrociencia, vol. 34, nm. 1, enero / febrero, 2000, pp. 57-68,
Colegio de Postgraduados
Mxico
Cmo citar? Fascculo completo Ms informacin del artculo Pgina de la revista
Agrociencia,
ISSN (Versin impresa): 1405-3195
agrocien@colpos.colpos.mx
Colegio de Postgraduados
Mxico
www.redalyc.org
Proyecto acadmico sin fines de lucro, desarrollado bajo la iniciativa de acceso abierto
57
UNA COMPARACIN DE SAS Y HARVEY EN LA ESTIMACIN DE COMPONENTES
DE VARIANZA EN MODELOS MIXTOS
A COMPARISON OF SAS AND HARVEY IN VARIANCE COMPONENT
ESTIMATION IN MIXED MODELS
Jos A. Cadena-Meneses
1
y Alberto Castillo-Morales
2
1
Departamento de Zootecnia. Universidad Autnoma Chapingo. 56230, Chapingo, Edo. de Mxico.
(cadena@taurus1.chapingo.mx).
2
Especialidad de Postgrado en Estadstica. ISEI. 56230, Montecillo,
Edo. de Mxico. (castillo@colpos.colpos.mx)
RESUMEN
La estimacin de componentes de varianza ayuda a identificar las
fuentes de variacin en programas de mejoramiento gentico ani-
mal y es un auxiliar para predecir los valores de reproduccin de
candidatos para la seleccin. Las estimaciones de dichos compo-
nentes, mediante los programas SAS y Harvey, no son iguales de-
bido al uso de algoritmos diferentes, sobre todo cuando se utilizan
datos desbalanceados y esto causa problemas de interpretacin.
En este trabajo se comparan ambos paquetes, con el objetivo de
auxiliar en la seleccin del mtodo y el procedimiento computa-
cional a usar. Se encontr que los mtodos de mxima verosimili-
tud y mxima verosimilitud restringida se deben preferir por sus
propiedades; la eleccin entre estos dos depender del tipo de da-
tos disponibles y de lo que se desea estimar. El paquete Harvey es
ms eficiente que SAS en el uso de recursos computacionales, pero
puede resolver menos modelos de manera directa.
Palabras clave: Gentica cuantitativa, mejoramiento gentico animal,
sistemas de cmputo.
INTRODUCCIN
L
os modelos de componentes de varianza son mo-
delos lineales que incorporan trminos aleatorios,
lo cual genera una matriz de varianzas y covarian-
zas con estructura conocida pero con valores paramtricos
desconocidos cuyas estimaciones se utilizan en el mejo-
ramiento gentico animal. Cuando se tienen datos que pro-
vienen de muestreo o de diseos desbalanceados se pre-
sentan problemas que han dado lugar a diferentes crite-
rios de estimacin, y al uso de diferentes algoritmos cuando
la solucin no es cerrada. En funcin del criterio de esti-
macin y del algoritmo que se use, es posible tener solu-
ciones diferentes y por ello conviene disponer de un estu-
dio que presente y compare los mtodos.
En trminos matriciales el modelo lineal mixto es
(1)
Recibido: Noviembre, 1997. Aprobado: Agosto, 1999.
Publicado como ARTCULO en Agrociencia 34: 57-68. 2000.
ABSTRACT
Variance component estimation is helpful for the identification of
variation sources in animal breeding; it is also helpful for the pre-
diction of breeding values of selection candidates. Estimations of
such components with SAS and Harvey programs are not the same,
due to the use of different numerical algorithms, especially with
unbalanced data, resulting in problems of interpretation. In this
paper, both packages are compared; the aim is to provide guide-
lines for the selection of the best method and procedure to be used.
Maximum likelihood and restricted maximum likelihood must be
preferred because of their properties; the choice between them will
depend on data type and what is going to be estimated. Harvey is
more efficient than SAS in the use of computational resources, but
it is restricted to only a few models.
Key words: Quantitative genetics, animal breeding, computation sys-
tems.
INTRODUCTION
M
odels of variance components are linear mod-
els that incorporate random terms, which gen-
erate a variance and covariance matrix with a
known structure but with unknown parametric values,
the estimations of which are used in animal breeding.
When data are obtained from samples or unbalanced
designs, problems occur resulting in differences in esti-
mation criteria, and in the use of different algorithms
when the solution is not closed. Depending on the esti-
mation criteria and the algorithm that is used, it is pos-
sible to obtain different solutions. For this reason, it is
suitable to have a study that presents and compares the
methods.
In matricial terms the mixed linear model is
(1)
where is the vector of unknown parameters of
fixed effects; X is a known matrix , usually a ma-
trix with incidences of zeros and ones, although it may
AGROCIENCIA VOLUMEN 34, NMERO 1, ENERO-FEBRERO 2000 58
donde es el vector de parmetros desconocidos
de efectos fijos; X es una matriz conocida, usual-
mente una matriz de incidencias de ceros y unos pero
puede incluir covariables; es un vector de efec-
tos aleatorios, de la forma con b
i
de
orden q
i
y q
1
+q
2
+...+q
c
=q con E(b
i
)=0, = B
y = B para es una
matriz de incidencias, conocida, con Z
i
de di-
mensin y el vector de trminos de error
aleatorios con y = B Si D =
? D entonces Var() = D, V = Var(Y) =
y por lo tanto es tal que
E(Y)=X y Var(Y)=V.
Una poblacin de animales generalmente presenta una
gran variabilidad entre ellos y esto permite seleccionar
aquellos que se considera podrn mejorar las carac-
tersticas de inters al investigador. La varianza fenotpica
? D es la suma de las varianzas atribuibles a fuentes de
variacin genticas (G) y ambientales (E), as como de
las interacciones entre ellas (Herrera, 1986). Esto se pue-
de representar por: = B
y si se supone que no existe correlacin entre el genotipo
y el medio ambiente,
ge
= 0, la particin de la varianza
fenotpica es: , donde es la varianza
fenotpica o varianza de la variable, es la varianza
gentica o varianza debida a los contenidos genticos de
los individuos, y es la varianza de los efectos am-
bientales a que han estado expuestos los individuos. A
y se les llama componentes de varianza y es
la varianza que se considera total.
En la gentica cuantitativa, el mejoramiento gentico
animal comprende, entre otras cosas, la estimacin de
parmetros genticos con los cuales se pueden evaluar
las diferencias genticas en las caractersticas de los ani-
males, ya que se desea seleccionar por el contenido ge-
ntico, no por la manifestacin fenotpica.
Procedimientos para la estimacin
de componentes de varianza
Mtodos basados en el anlisis de varianza
Estos mtodos usan las sumas de cuadrados de una
tabla del anlisis de varianza; las sumas de cuadrados se
include covariables; is a vector of aleatory ef-
fects of the form with b
i
of order q
i
and q
1
+q
2
+...+q
c
=q with E(b
i
)=0, = B and
= B for is a known
incidence matrix, with Z
i
with dimensions and
the vector with aleatory error terms with
and = B If D = ? D then
Var() = D, V = Var(Y) = and therefore
is such that E(Y)=X and Var(Y)=V.
An animal population generally presents great vari-
ability among its members, and this makes it possible
to select the subjects which would best improve the traits
of interest to the researcher. The phenotypic variance
? D is the sum of the variances attributable to genetic
(G) and environmental (E) variation sources, as well as
to the interactions that occur between them (Herrera,
1986). This can be represented by: = B
and if it is assumed that no correlation
exists between genotype and environment,
ge
= 0, the
partition of the phenotypic variance is: ,
where is the phenotypic variance or variance of the
variable, is the genetic variance or variance due to
the individual genetic content, and is the variance of
the environmental effects to which the individuals have
been exposed. and are referred to as variance com-
ponents and is considered the total variance.
In quantitative genetics, animal breeding includes,
among other things, the estimation of genetic parameters
with which the genetic differences in the traits of the ani-
mals can be evaluated, given that the selection is to be
made according to genetic content, not phenotypic mani-
festation.
Procedures for the estimation
of variance components
Methods based on analysis of variance
These methods employ the sums of squares of the
analysis of variance table; the sums of squares are equated
to their expectations for the estimation of the variance
components.
For unbalanced data, Hendersons Methods II and III
(1953) are the most useful. Method II is appropriate for
mixed models that do not include interactions or nesting
CADENA-MENESES Y CASTILLO-MORALES: COMPONENTES DE VARIANZA MEDIANTE SAS Y HARVEY 59
igualan con sus esperanzas para estimar los componen-
tes de varianza.
Para datos desbalanceados destacan los Mtodos II y
III de Henderson (1953). El Mtodo II es apropiado para
modelos mixtos que no incluyen interacciones ni anida-
miento de factores fijos con aleatorios; el Mtodo III uti-
liza reducciones en las sumas de cuadrados debidas al
ajuste de submodelos elegidos para producir sumas de
cuadrados libres de los efectos fijos del modelo. Estos
mtodos producen estimadores que son insesgados pero
pueden dar estimaciones negativas de componentes de
varianza (Searle, 1971).
Una limitacin potencial del Mtodo III es la canti-
dad de operaciones aritmticas requeridas para obtener
las reducciones en las sumas de cuadrados y los coefi-
cientes de los componentes de varianza en los valores
esperados de las reducciones, ya que puede involucrar la
inversin de matrices de dimensin igual al nmero de
efectos aleatorios en los datos, lo cual en muchos casos
(particularmente en estudios de reproduccin animal) es
computacionalmente difcil.
Mxima verosimilitud
Bajo la suposicin de que los efectos aleatorios y el
error tienen distribucin normal, se puede usar mxima
verosimilitud (ML) para estimar a los componentes de
varianza.
Hartley y Rao (1967) aplican por primera vez la me-
todologa de mxima verosimilitud a los componentes
de varianza en el caso ms general del modelo mixto.
Ellos reescriben el Modelo 1 como
(2)
en donde y los dems trmi-
nos se definen como en (1). Al derivar la funcin de den-
sidad conjunta de los componentes aleatorios se obtie-
nen los siguientes estimadores de mxima verosimilitud:
? D (3)
? D
para i, j = 0, 1,...,c (4)
donde en (1),
? D estima a
of fixed factors with random effects; Method III utilizes
reductions in the sums of squares due to the adjustment
of submodels selected to produce sums of squares free
from the fixed effect of the model. These methods pro-
duce estimators that are unbiased but which can give nega-
tive estimates of variance components (Searle, 1971 ).
A potential limitation of Method III is the quantity of
arithmetical operations required to obtain the reductions
in the sums of squares and the coefficients of the vari-
ance components in the expected values of the reduc-
tions, in which it may involve the inversion of matrices
with dimensions equal to the number of aleatory effects
in the data, which in many cases (especially in animal
breeding studies) are difficult to calculate.
Maximum likelihood
Assuming that the aleatory effects and the error have
a normal distribution, maximum likelihood (ML) may
be used to estimate the variance components.
Hartley and Rao (1967) applied the maximum likeli-
hood methodology to the variance components for the
first time in the more general case of the mixed model.
They rewrite the Model 1 as
(2)
where , and the other terms
are defined as in (1). The following estimators of maxi-
mum likelihood are obtained upon deriving the joint den-
sity function of the random components:
? D (3)
? D
for i, j = 0, 1,...,c (4)
where in (1),
? D estimates to
, is the solution to (4) which
corresponds to
and and are defined as V and P
with instead of . Furthermore, in the solution al-
gorithm it is supposed that for i = 0, 1,...,c.
Some of the characteristics of these equations are: a)
except in certain cases (Szatrowski, 1977), should be
AGROCIENCIA VOLUMEN 34, NMERO 1, ENERO-FEBRERO 2000 60
, es la solucin a (4) que co-
rresponde a
y y se definen como V y P con
en lugar de Adems, en el algoritmo de solucin se
supone que para i = 0, 1,...,c.
Algunas caractersticas de estas ecuaciones son: a)
salvo en casos particulares (Szatrowski, 1977), se debe
obtener de manera iterativa; y b) el estimador
de en
(3) corresponde con el estimador de mnimos cuadrados
generalizados modificado reemplazando V por su esti-
mador de mxima verosimilitud ; por eso se usa la no-
tacin
en (3).
Mxima verosimilitud restringida
Tambin bajo el supuesto de normalidad, Patterson y
Thompson (1971) introducen la idea de mxima verosi-
militud restringida o REML, que se obtiene al resolver
las ecuaciones:
? D (5)
Cuyas principales caractersticas son: a) la solucin
de mxima verosimilitud restringida de
se puede ob-
tener de (5) slo mediante iteraciones; b) se limita a ser
no negativa de la misma manera que se limit a ; c)
no hay estimador de implcito en el mtodo de mxima
verosimilitud restringida. Un estimador podra ser
? D pero no se conocen sus propie-
dades, donde
en lugar de
y d) el lado izquierdo de las ecuaciones de mxima
verosimilitud restringida son las de mxima verosimili-
tud con
of in (3)
corresponds to the estimator of generalized least squares
modified by substituting V by its maximum likelihood
estimator ; for this reason the
notation is used in
(3).
Restricted maximum likelihood
Also under the assumption of normality, Patterson and
Thompson (1971) introduce the idea of restricted maxi-
mum likelihood or REML, which is obtained by solving
the equations:
? D (5)
The characteristics of which are: a) the solution of
restricted maximum likelihood of
may be obtained
from (5) only through iterations; b) it is restricted to be-
ing not negative in the same way that was; c) there is
no estimator of implicit in the restricted maximum like-
lihood method. An estimator could be
? D
is V
with the values of
; pero
de ;
c) las ecuaciones de MINQUE (7) se producen de las
ecuaciones de REML (5) al reemplazar P en lugar de P
w
;
= B = B (6)
If an estimator is sought for the general linear combi-
nation of the variance components, where is a
known vector, the estimator is for an A, such that
= B and that minimizes (6) (Searle, 1979).
If were known, in (1), the natural estimator would be
for a known (Rao, 1972). However, since is
unknown, must be used as the estimator for the
symmetrical matrix A with AX = 0; thus =
For preassigned values of the variance components rep-
resented by w, there is the corresponding D
w
. The differ-
ence between the natural estimator and the estimator to
be used is The obtainment of MINQUE is
based on the minimization of the weighed norm for this
matrix, with the weight proportional to , that is, the
determinant of = B is minimized. This
leads to a minimization of tr(AV
w
)
2
where V
w
is V with
the variance components substituted by w. Hence, the
resulting equations for the estimator of are:
? D I
F
correspondiente a w se
usa este valor de
= ? D
CADENA-MENESES Y CASTILLO-MORALES: COMPONENTES DE VARIANZA MEDIANTE SAS Y HARVEY 63
esto es equivalente a definir un vector que contiene los
cuadrados y productos cruzados de las observaciones para
los cuales
= B (9)
donde tiene una forma conocida. Pukelsheim llama a
(9) Modelo de Dispersin Media. Como es un modelo
lineal en , entonces se pueden aplicar los principios
de mnimos cuadrados ordinarios (OLS) y mnimos cua-
drados generalizados (GLS), para estimar a
Searle (1979) establece que GLS en (9) con
en lugar de Y, y al reemplazar a por
= ? D
produce las ecuaciones de mxima verosi-
militud (4).
En estos dos ltimos resultados se tiene al modelo de
dispersin media como un punto de unificacin de ML y
MINQUE. A travs de MINQUE se involucra tambin a
I-MINQUE, MINQUE0, I-MIVQUE, MIVQUE local y
REML. Por lo tanto, adems de los tres mtodos de Hen-
derson slo hay dos mtodos verdaderamente diferentes,
los que se pueden categorizar como ML y REML, ambos
bajo normalidad. A travs de REML se pueden identifi-
car los MINQUE y MIVQUE de la siguiente manera: 1)
REML (bajo normal) = I-MINQUE = I-MIVQUE (bajo
normal); 2) La primera iteracin de REML (bajo nor-
mal) = un MINQUE = un MIVQUE local; y 3) MINQUE0
= Un caso especial de MINQUE.
Herramientas para la estimacin
de componentes de varianza
Para obtener estimaciones de los componentes de
varianza se necesita de programas computacionales que
apliquen alguno de los mtodos descritos. En el entorno
del Colegio de Postgraduados y la Universidad Autno-
ma Chapingo se han usado dos paquetes computacionales
en la estimacin de modelos mixtos: SAS (1988, 1996) y
LSMLMW (Harvey, 1990).
SAS
Los procedimientos de SAS de inters en el presente
escrito son GLM, VARCOMP y MIXED. A continua-
cin se describe, de manera breve, a cada uno de ellos.
El procedimiento GLM de SAS usa el mtodo de m-
nimos cuadrados para ajustar modelos lineales genera-
les. Puede manejar variables de clasificacin y variables
continuas, permite la especificacin de cualquier grado
de interaccin y anidamiento de efectos. Dentro de GLM
, the equations of maximum likelihood (4) are
obtained.
In these last two results, the dispersion-mean model
serves as a unification point for ML and MINQUE.
Through MINQUE, I-MINQUE, MINQUE0, I-
MIVQUE, local MIVQUE and REML are involved.
Therefore, in addition to the three Henderson methods,
there are only two methods which are really different.
They can be categorized as ML and REML, both under
normality. Through REML, the MINQUE and MIVQUE
can be identified in the following manner: 1) REML (un-
der normal) = I-MINQUE = I-MIVQUE (under normal);
2) the first iteration of REML (under normal) = one
MINQUE = one local MIVQUE; and 3) MINQUEO = a
special MINQUE case.
Tools for the estimation of variance components
In order to obtain estimations of variance components,
computational programs which apply one of the meth-
ods described are needed. At the Colegio de Postgradua-
dos and the Universidad Autnoma Chapingo, two com-
putational packages have been used in the estimation of
mixed models: SAS (1988, 1996) and LSMLMW
(Harvey, 1990).
SAS
The SAS procedures of interest in the present work
are GLM, VARCOMP and MIXED. A brief description
of each follows.
The GLM procedure of SAS employs the least squares
method to adjust general linear models. It can manage
classification variables and continuous variables, and al-
lows the specification of any degree of interaction and
nesting of effects. Within GLM, the RANDOM statement
permits the specification of random effects in the model.
It prints the expected mean squares of each of the differ-
ent types of sums of squares referred to as Type I, Type
II, Type III and Type IV, according to the users choice
(Castillo, 1985; SAS, 1988). When this is applied to a
group of unbalanced data, it is necessary to choose be-
tween the sums of squares of Types II, III and IV, de-
pending on the problem, as well as the variance compo-
nents which may be derived from them.
The VARCOMP procedure calculates estimations of
the variance components in a general linear model. It has
four available methods for the estimation of variance com-
ponents, which are: the Type I Method, that is equivalent
to what is generated by GLM in its Type I option of sums
of squares; the MIVQUE0 Method, based on the mini-
mum norm or minimum variance technique (Hartley et
al., 1973); the Maximum Likelihood Method (ML), that
calculates the estimations of maximum likelihood of the
AGROCIENCIA VOLUMEN 34, NMERO 1, ENERO-FEBRERO 2000 64
el enunciado RANDOM permite especificar efectos alea-
torios en el modelo. Imprime los cuadrados medios es-
perados para cada uno de los diferentes tipos de sumas
de cuadrados denominados como Tipo I, Tipo II, Tipo III
y Tipo IV segn lo solicite el usuario (Castillo, 1985;
SAS, 1988). Cuando se aplica a un conjunto de datos
desbalanceados se tendra que escoger entre las sumas
de cuadrados Tipos II, III y IV, segn el problema, as
como los componentes de varianza que de stas se pue-
dan derivar.
El procedimiento VARCOMP calcula estimaciones de
los componentes de varianza en un modelo lineal gene-
ral. Tiene disponibles cuatro mtodos para la estimacin
de componentes de varianza, los cuales son: El Mtodo
Type I que es equivalente a lo que genera GLM en su
opcin de sumas de cuadrados Tipo I; el Mtodo
MIVQUE0, basado en la tcnica de mnima norma o
mnima varianza (Hartley et al., 1978); el Mtodo de
Mxima Verosimilitud (ML) calcula las estimaciones de
mxima verosimilitud de los componentes de varianza,
usa la transformacin W desarrollada por Hemmerle y
Hartley (1973) y utiliza los resultados de MIVQUE0
como valores de la primera iteracin; el Mtodo de Mxi-
ma Verosimilitud Restringida (REML), que primero se-
para la verosimilitud en dos partes, una que contiene los
efectos fijos y otra los aleatorios, utiliza algoritmos simi-
lares a los de ML, y tambin sus valores iniciales son los
de MIVQUE0. Se tiene que especificar cules son los
efectos fijos, mismos que deben escribirse al principio
del modelo; no acepta variables continuas.
El procedimiento MIXED de SAS (1996) ajusta mo-
delos lineales mixtos y calcula pruebas basadas en las
sumas de cuadrados Tipo III para los efectos fijos. Puede
proporcionar estimaciones y hacer inferencias tanto de
los factores fijos como de los aleatorios basndose en el
modelo mixto de Henderson (1984). El enunciado
RANDOM del procedimiento MIXED incorpora al mo-
delo los efectos aleatorios que constituyen el vector de
stos en el modelo mixto. MIXED tiene tres mtodos de
estimacin de componentes de varianza: MIVQUE0, ML
y REML.
Harvey
El paquete de computacin Modelo Mixto de Mni-
mos Cuadrados y Mxima Verosimilitud (Versin PC-2)
de Harvey (1990) define nueve modelos especficos:
MODEL1 a MODEL9. MODEL1 resuelve problemas de
factores fijos en forma similar al SAS y los resultados
son iguales a los Tipo III de GLM de SAS. Para resolver
los modelos mixtos especficos que se ajustan en
MODEL2 al MODEL7, utiliza el Mtodo III de Hender-
son (1953). Para cada MODEL se tiene un tipo especfi-
co de efectos aleatorios (Harvey, 1990). Los modelos
variance components, utilizes the W transformation de-
veloped by Hemmerle and Hartley (1973) and employs
the results of MIVQUE0 as values of the first iteration;
the Restricted Maximum Likelihood Method, which first
separates the likelihood in two parts, one containing the
fixed effects and the other the random effects, utilizes
algorithms similar to those of ML, and has the same ini-
tial values as MIVQUEO. It is necessary to specify the
fixed effects, which must be written at the beginning of
the model; continuous variables are not accepted.
The MIXED SAS (1976) procedure adjusts mixed lin-
ear models and calculates proofs based on the Type III
sums of squares for the fixed effects. It can provide esti-
mates and make inferences of both the fixed and random
factors based on Hendersons mixed model(1984). The
RANDOM statement of the MIXED procedure incorpo-
rates the random effects into the model which constitute
the vector of these same effects in the mixed model.
MIXED has three methods of variance component esti-
mation: MIVQUEO, ML and REML.
Harvey
The Harveys (1990) Mixed Model Least-Squares and
Maximum Likelihood computational package (PC-2 Ver-
sion) defines nine specific models: MODEL1 to
MODEL9. MODEL1 solves problems of fixed factors in
a manner similar to SAS, and the results are the same as
the SAS GLM Type III. It utilizes Hendersons Method
III (1953) to solve the specific mixed models which are
adjusted in MODELS2 to MODEL7. For each MODEL,
there is a specific type of random effect (Harvey, 1990).
The MODELS8 and MODEL9 are the same as MOD-
ELS2 and MODEL3, but are solved by means of
Hendersons mixed model method (1984), making it pos-
sible to obtain MINQUE or iterative MINQUE variance
component estimations.
MATERIALS AND METHODS
The analysis was carried out with the Harveys LSMLMW and
MIXMDL and the GLM, VARCOMP and MIXED of SAS. The meth-
ods described were applied to the example presented by Patterson and
Thompson (1971) (Table 1). The programs were carried out on a
Pentium at 120 MHz and 16 Mb in RAM. For this purpose, the Harvey
package, version PC-2, and SAS, version 6.11 were installed.
Treatments will be considered as fixed and blocks will be consid-
ered as random and there is some interest in estimating the variance
component of blocks.
RESULTS AND DISCUSSION
The variance components generated by the SAS
VARCOMP procedure for each of the four methods are
presented in Table 2.
CADENA-MENESES Y CASTILLO-MORALES: COMPONENTES DE VARIANZA MEDIANTE SAS Y HARVEY 65
MODEL8 y MODEL9 son los mismos que los modelos
MODEL2 y MODEL3, pero se resuelven mediante el
mtodo del modelo mixto de Henderson (1984), pudin-
dose obtener estimaciones MINQUE o MINQUE iterativo
de los componentes de varianza.
MATERIALES Y MTODOS
El anlisis se efectu mediante el uso de LSMLMW y MIXMDL
de Harvey y GLM, VARCOMP y MIXED de SAS. Los mtodos dis-
cutidos se aplicaron al ejemplo que presentan Patterson y Thompson
(1971) (Cuadro 1). Los programas fueron ejecutados en un equipo
Pentium a 120 MHz y 16 Mb en RAM. Para ello se instalaron los
paquetes Harvey, versin PC-2, y SAS, versin 6.11.
Se considerar que los tratamientos son fijos y los bloques son
aleatorios, y se tiene inters en la estimacin del componente de va-
rianza de bloques.
RESULTADOS Y DISCUSIN
Los componentes de varianza generados por el pro-
cedimiento VARCOMP de SAS para cada uno de los cua-
tro mtodos se presentan en el Cuadro 2.
Al aplicar el procedimiento MIXED se obtuvieron los
tres mtodos para la obtencin de las estimaciones de los
componentes de varianza (Cuadro 3).
El procedimiento GLM no da las estimaciones de los
componentes de varianza de manera directa, pero pro-
porciona la informacin suficiente para que se puedan
obtener los resultados del Cuadro 4.
Los resultados obtenidos mediante la aplicacin de
LSMLMW y MIXMDL se presentan en el Cuadro 5. Para
este programa se tomaron en cuenta varias posibilidades
que se ajustan a las caractersticas de los diferentes mode-
los definidos por el paquete.
When the MIXED procedure was applied, the three
methods for calculating the variance component estima-
tions were obtained (Table 3).
The GLM procedure does not give the variance com-
ponent estimations directly, but it provides sufficient in-
formation to obtain the results of Table 4.
The results obtained through the application of
LSMLMW and MIXMDL are presented in Table 5. For
this program, various possibilities were taken into account
which adjust to the characteristics of the different mod-
els defined by the package.
In MODEL8, if the REML option is not put in the
model line, the program provides a MINQUE estimation,
case
(with the
REML option).
In the first group all of the results are the same (Tables
2, 4 and 5), although the calculation algorithms differ in
each of the methods used.
The second group generates two distinct estimations;
the one obtained by SAS through the VARCOMP (Table 2)
Cuadro 2. Estimaciones obtenidas con VARCOMP de SAS.
Table 2. Estimates obtained with SAS VARCOMP.
Mtodo de estimacin
Componentes de varianza
TYPE 1 MIVQUE0 ML REML
Bloques 4.41111845 5.04641017 2.50319590 3.95844991
Error 2.52367576 2.10875086 2.35207015 2.51846300
Cuadro 1. Datos tomados de Patterson y Thompson (1971).
Table 1. Data taken from Patterson and Thompson (1971).
Tratamientos
Bloques
1 2
1 3,2 2,3
2 2,3,5,6,7 8,8,9
3 3 4,4,3,2,5
AGROCIENCIA VOLUMEN 34, NMERO 1, ENERO-FEBRERO 2000 66
En MODEL8 si no se pone la opcin REML en la
lnea de modelo, el programa proporciona una estima-
cin MINQUE, caso
Model8
de
LSMLMW con valor REP = 0.15 (Cuadro 5).
Las estimaciones de mxima verosimilitud se obtu-
vieron mediante el mtodo ML de los procedimientos
VARCOMP (Cuadro 2), y MIXED (Cuadro 3), de SAS.
Con estos resultados parece evidente, sobre todo, la sub-
estimacin del componente de varianza correspondiente
a los bloques, ya que los estimadores de mxima verosi-
militud son sesgados y ante un conjunto de datos tan pe-
queo, esto se hace muy evidente en la estimacin de
este componente de varianza.
Si ahora se considera a las estimaciones de mxima
verosimilitud restringida entonces SAS genera dos esti-
maciones. Una mediante el mtodo REML dentro del pro-
cedimiento VARCOMP (Cuadro 2), y la otra mediante el
mismo mtodo pero dentro del procedimiento MIXED
(Cuadro 3). Por otro lado, MODEL8
de MIXMDL (Cua-
dro 5), da resultados similares a los anteriores a pesar de
usar algoritmos diferentes.
Desde el punto de vista terico los estimadores de
mxima verosimilitud son los que renen las mejores pro-
piedades ya que, si bien son sesgados, tienen la propiedad
de ser BAN (Best Asymptoticaly Normal) (Mood et al.,
1975). Dos de los mtodos que se han descrito, ML y
REML, son formas de estimaciones de mxima verosimi-
litud y por tanto tienen las mismas propiedades asintticas
para las estimaciones que cada uno de ellos produce.
No es una decisin fcil el escoger entre ML y REML,
ya que ambos tienen puntos a su favor. Al aplicarse REML
a datos balanceados proporciona resultados idnticos a las
estimaciones de Anlisis de Varianza, pero no proporciona
estimaciones de los factores fijos. Por su parte, al aplicarse
las estimaciones de ML a datos balanceados no se obtie-
nen resultados idnticos a los de Anlisis de Varianza; pero
ML proporciona estimaciones de mxima verosimilitud
de los factores fijos, los que, obviamente, sern BAN. En
los problemas de reproduccin animal los datos suelen ser
desbalanceados, con muchas observaciones, frecuentemen-
te miles, y con muchos niveles de los factores, en ocasio-
nes cientos; con lo que se fortalecen las propiedades
asintticas de ML, tanto para las estimaciones de los efec-
tos fijos como de los aleatorios.
En lo que se refiere a los paquetes usados, SAS o
HARVEY, se deben considerar las ventajas y desventa-
jas de cada uno de ellos. SAS tiene como ventajas, en el
described, ML and REML, are forms of maximum like-
lihood estimations and therefore possess the same asymp-
totic properties for the estimations as produced by each
one.
It is not easy to decide between ML and REML, as
there are advantages to both. When REML is applied to
balanced data, it produces results which are identical to
the Analysis of Variance estimations, but it does not pro-
vide estimations of the fixed factor. On the other hand,
when the ML estimations are applied to balanced data,
the results obtained are not identical to those of the Vari-
ance Analysis; but ML provides maximum likelihood es-
timations of the fixed factors, which are obviously BAN.
In problems of animal breeding, the data tends to be un-
balanced, with many observations, often thousands, and
with many levels of factors, sometimes hundreds; with
which the asymptotic properties of ML are strengthened,
for the estimations of fixed as well as random effects.
As to the choice of packages to be used, SAS or
Harvey, the advantages of either must be considered. In
the Universidad Autnoma Chapingo and the Colegio de
Postgraduados, the advantages of SAS are that it is fa-
miliar to a large number of users, and that it provides
many other statistical tools. Its main disadvantage is that
the most recent versions, which are those that include
MIXED, require a lot of space on hard disc and in RAM
memory; i.e., SAS Version 6.11 requires between 250
and 300 MB of space on hard disc, depending on which
one the user wishes to install, and in order for it to run
without problems, a minimum of 16 MB of RAM memory
are recommended. On the other hand, HARVEY does
not solve other statistical problems, but it is more effi-
cient than SAS for the estimation of variance components
in the use of computational resources, requiring only 3
MB in hard disc and 512 Kb in RAM. However, it has the
disadvantage of using a specific terminology for the area
of animal breeding, which makes it appropriate for this
area, but not for other users.
CONCLUSIONS
The estimators of maximum likelihood must be pre-
ferred for their theoretical characteristics. The estima-
tors based on analysis of variance only have the property
of being unbiased. For the given example, where there
are few observations, the best choice would be REML,
given that they do not apply asymptotic properties of ML.
In real situations of animal breeding with many observa-
tions, ML should be preferred. It is not recommendable
to use the MINQUE (or MIVQUE) estimations due to
the fact that they are the first step of the iterative pro-
cesses. There is no reason to stop at this first step, when
the iterations can be continued and the I-MINQUE or
REML obtained. The choice between SAS and HARVEY
AGROCIENCIA VOLUMEN 34, NMERO 1, ENERO-FEBRERO 2000 68
entorno de la Universidad Autnoma Chapingo y el Co-
legio de Postgraduados, el que es ampliamente difundi-
do y es conocido por una gran cantidad de usuarios,
adems de que cuenta con muchas otras herramientas
estadsticas. Su principal desventaja es el hecho de que
las versiones ms recientes, que son las que cuentan con
MIXED, requieren de mucho espacio en disco duro y
en memoria RAM; i. e., la Versin 6.11 de SAS requie-
re de entre 250 y 300 MB de espacio en disco duro,
dependiendo de lo que el usuario desee instalar, y para
que corra sin problemas se recomienda un mnimo de
16 MB de memoria RAM. Por otro lado, HARVEY no
pretende resolver otros problemas estadsticos, pero para
la estimacin de componentes de varianza es ms efi-
ciente que SAS en el uso de los recursos computaciona-
les, slo requiere 3 MB en disco duro y 512 Kb en RAM;
pero tiene la desventaja de que usa una terminologa
especfica para el rea de reproduccin animal, lo que
es apropiado para esa rea pero le resta atractivo para
otros usuarios.
CONCLUSIONES
Por sus caractersticas tericas deben preferirse los
estimadores de mxima verosimilitud. Los estimadores
basados en el anlisis de varianza slo tienen la propie-
dad de ser insesgados. Para el ejemplo aqu presentado,
donde hay pocas observaciones, la mejor eleccin sera
REML, ya que no aplican las propiedades asintticas de
ML. En situaciones reales de reproduccin animal, con
muchas observaciones, se debe preferir ML. No es con-
veniente usar las estimaciones MINQUE (o MIVQUE)
por el hecho de que son el primer paso de los procesos
iterativos; nada conduce a detenerse en este primer paso,
si se puede continuar con las iteraciones y obtener los I-
MINQUE o REML. La eleccin entre SAS y HARVEY
depender de los recursos computacionales y econmi-
cos con que se cuente; si los hay se recomienda SAS.
LITERATURA CITADA
Brown, K. G. 1976. Asymptotic behavior of MINQUE-type estimators
of variance components. Ann. Stat. 4: 746-754.
Castillo M., A. 1985. Las funciones que estima el paquete para an-
lisis estadsticos SAS. Comunicaciones en Estadstica y Cm-
puto. CEC. CP. Vol. 4, Nm. 3. 31 p.
will depend on the computational and economic resources
which are available; when they are available, then SAS is
recommended.
End of the English version
Hartley, H. O., and J. N. K. Rao. 1967. Maximum-likelihood estima-
tion for the mixed analisis of variance model. Biometrika 54:
93-108.
Hartley, H. O., J. N. K. Rao, and L. LaMotte. 1978. A simple synthe-
sis-based method of variance component estimation. Biometrics
34: 233-242.
Harvey, W. R. 1990. Users Guide for LSMLMW and MIXMDL. PC-
2 Version. Mixed Model Least-Squares and Maximum Likelihood
Computer Program. Columbus, Ohio. 91 p.
Hemmerle, W. J., and H. O. Hartley. 1973. Computing maximum like-
lihood estimates for the mixed AOV model using the W-transfor-
mation. Technometrics 15: 819-831.
Henderson, C. R. 1953. Estimation of variance and covariance com-
ponents. Biometrics 9: 226-252.
Henderson, C. R. 1984. Applications of Linear Models in Animal
Breeding. University of Guelph. Ontario, Canada. 462 p.
Herrera H., J. G. 1986. Introduccin al Mejoramiento Gentico Ani-
mal. Centro de Ganadera. Colegio de Postgraduados. Chapingo,
Edo. de Mxico. 128 p.
LaMotte, L. R. 1973. Quadratic estimation of variance components.
Biometrics 29: 311-330.
Mood, A. M., F. A. Graybill, and D. C. Boes. 1975. Introduction to the
Theory of Statistics. McGraw-Hill, N. Y. pp: 276-296.
Patterson, H. D., and R. Thompson. 1971. Recovery of interblock
information when block sizes are unequal. Biometrika 58: 545-
554.
Pukelsheim, F. 1976. Estimation of variance components in linear
models. J. Multivariate Analysis 6: 626-629.
Rao, C. R. 1972. Estimation of variance and covariance components
in linear models. J. Am. Stat. Assoc. 67: 112-115.
SAS Institute. 1988. SAS/STAT Users Guide. Release 6.03, Cary, N.
C. 1028 p.
SAS Institute. 1996. SAS/STAT Software: Changes and Enhancements
through Release 6.11. Cary, N. C. pp: 531-656.
Searle, S. R. 1971. Topics in variance components estimation. Bio-
metrics 27: 1-76.
Searle, S. R. 1979. Maximum likelihood and minimum variance esti-
mation of variance components. Proc. Conf. in Honor of C. R.
Henderson. Cornell Univ. Ithaca, N. Y. pp: 59-68.
Szatrowski, T. H. 1977. Necessary and sufficient conditions for ex-
plicit solutions in the multivariate normal estimation problem for
patterned means and covariances. Tech. Rep. Department of Sta-
tistics, Rutgers Univ. 43 p.
Townsend, E. C., and S. R. Searle. 1971. Best quadratic unbiased esti-
mation of variance components from unbalanced data in the 1-
way classification. Biometrics 27: 643-657.