Sunteți pe pagina 1din 11

Agrociencia

ISSN: 1405-3195
agrocien@colpos.mx
Colegio de Postgraduados
Mxico

Cadena Meneses, Jos A; Castillo Morales, Alberto


Uso de MTGSAM y muestreo de GIBBS en la estimacin de componentes de varianza
Agrociencia, vol. 36, nm. 3, mayo-junio, 2002, pp. 345-354
Colegio de Postgraduados
Texcoco, Mxico

Disponible en: http://www.redalyc.org/articulo.oa?id=30236308

Cmo citar el artculo


Nmero completo
Sistema de Informacin Cientfica
Ms informacin del artculo Red de Revistas Cientficas de Amrica Latina, el Caribe, Espaa y Portugal
Pgina de la revista en redalyc.org Proyecto acadmico sin fines de lucro, desarrollado bajo la iniciativa de acceso abierto
USO DE MTGSAM Y MUESTREO DE GIBBS EN LA ESTIMACIN
DE COMPONENTES DE VARIANZA

USING MTGSAM AND GIBBS SAMPLING IN VARIANCE COMPONENTS ESTIMATION

Jos A. Cadena-Meneses1 y Alberto Castillo-Morales2

1
Departamento de Zootecnia. Universidad Autnoma Chapingo. 56235. Chapingo, Estado de Mxi-
co. (cadena@taurus1.chapingo.mx). 2Departamento de Matemticas. Universidad Autnoma Metro-
politana, Iztapalapa. Mxico, D. F. (acm@xanum.uam.mx).

RESUMEN ABSTRACT

En este trabajo se presenta una estrategia para la estimacin de This work presents a strategy for the estimation of variance
componentes de varianza de un problema de un establo lechero components for a dairy problem by applying Gibbs sampling
mediante el uso del paquete computacional MTGSAM que utiliza through the use of the MTGSAM computer program. It presents
el muestreo de Gibbs. Se presentan los diferentes resultados obte- the different results obtained by changing the initial values of the
nidos cambiando los valores iniciales de los parmetros a estimar, parameters to be estimated, as well as the criteria for taking
as como los diferentes criterios para tomar la muestra de la cade- Markovs chain samples. It is concluded that there are no general
na de Markov. Se concluye que no existen criterios generales para rules for obtaining the sample, and that appropriate a priori
la obtencin de la muestra, y se requieren distribuciones a priori distributions for variance components are required
apropiadas.
Key words: Markovs chains, variance components, bayesian methods.
Palabras clave: Cadenas de Markov, componentes de varianza, m-
todos bayesianos. INTRODUCTION

I
INTRODUCCIN n the genetic improvement of livestock, it is often
necessary to obtain estimations of the variance
components, from which various indices are defined

E
n el mejoramiento gentico animal, con frecuen-
cia se tiene la necesidad de contar con estima- that will determine the selection criteria for the animals
ciones de las componentes de varianza, a partir that should be used, because of their characteristics, as a
de las cuales se definen varios ndices mediante los que base for the future generations. The objective of this work
se determinarn los criterios de seleccin de los anima- is to present a strategy for the use of the MTGSAM
les que, por sus caractersticas, conviene utilizar como program for the estimation of variance components based
base de las generaciones futuras. El objetivo de este tra- on Gibbs sampling. The MTGSAM was selected because
bajo es presentar una estrategia de uso del paquete it allows the inclusion of pedigree, and makes bayesian
MTGSAM para la estimacin de componentes de varian- estimation using Gibbs sampling, which had not been
za basada en muestreo de Gibbs. Se eligi MTGSAM used in animal science for lack of an adequate program
por que es un paquete que permite la inclusin del pedi- that could be used with relative ease.
gr de los animales y hace estimacin bayesiana utilizan- Variance components correspond to the different
do muestreo de Gibbs, que no haba sido usado en cien- sources which contribute to the variation of a given
cia animal por la ausencia de un paquete adecuado y de observation. Their estimation is usually based on the data
uso relativamente fcil. found in the production control programs, which contain
Los componentes de varianza corresponden a las di- information related to fertility, milk and meat production,
ferentes fuentes que contribuyen a la variacin de una quality of product, etc. Although this information is
observacin. Su estimacin suele hacerse a partir de los primarily used for management purposes or production
datos que se tienen en los programas de control de pro- quantification, it can also be used to calculate genetic
duccin, los cuales contienen informacin sobre fertili- values, to estimate genetic parameters based on field
dad, produccin de leche, y carne, calidad del producto, records, or to determine the potential importance of other
etctera. Aunque en primera instancia esta informacin effects, which in the context of classical statistics are
known as fixed effects, and in the bayesian context as
Recibido: Enero, 2001. Aprobado: Abril, 2002. subordinate effects; such as the age of the dam, sex of
Publicado como ENSAYO en Agrociencia 36: 345-354. 2002. the animal and time of year, among others.

345
346 AGROCIENCIA VOLUMEN 36, NMERO 3, MAYO-JUNIO 2002

es usada con propsitos de manejo o de cuantificacin In matricial terms the mixed lineal model is
de la produccin, puede emplearse tambin para calcular
valores genticos, para la estimacin de parmetros Y=Xb+Ux+e (1)
genticos a partir de registros de campo, o para determi-
nar la importancia potencial de otros efectos, a los que en where Y is a vector (nx1) of observations, b is a vector
el contexto de la estadstica clsica se les conoce como (sx1) of unknown parameters with fixed effects, X is a
efectos fijos, y en el contexto bayesiano, como efectos known matrix (nxs), usually an incidence matrix with
subordinados; tales como la edad de la madre, sexo del zeros and ones, but which may include covariables, x is a
animal y poca del ao, entre otros. vector (tx1) of random effects of the form x=[x1, x2,...,
En trminos matriciales el modelo lineal mixto es xc]; with xi of order ti, t1 + t2 +...+ tc=t and xi ~ (0, si2 Ati)
with cov(xi, xi) = 0 for ii. U=[U1, U2,...,Uc] is an
Y=Xb+Ux+e (1) incidence matrix (nxt), known, with Ui of dimensions
nxti, and x ~ (0, se2 In) is the vector (nx1) of random error
donde Y es un vector (nx1) de observaciones, b es un vector terms. Furthermore, if A=diag(s2i Ati), then var(x)=A,
(sx1) de parmetros desconocidos de efectos fijos, X es V=var(Y)=UAU+se2 In and Y ~ (Xb, V).
una matriz (nxs) conocida, usualmente una matriz de in-
cidencias de ceros y unos, pero que puede incluir The animals usually present great variability, and this
covariables, x es un vector (tx1) de efectos aleatorios, de makes it possible to select the individuals which could
la forma x=[x1, x2,..., xc]; con xi de orden ti, t1 + t2 improve the traits of interest. The variations of the
+...+ tc=t y xi ~ (0, si2 Ati) con cov(xi, xi) = 0 para ii. observable traits, known as phenotypical, are the result
U=[U1, U2,...,Uc] es una matriz (nxt) de incidencias, co- of a combination of genetic effects of the additive type,
nocida, con Ui de dimensiones nxti, y x ~ (0, se2 In) es el as well as of their interactions, whose expression may be
vector (nx1) de trminos de error aleatorios. Adems si modified by the environment in which the animals grow;
A=diag(s2i Ati), entonces var(x)=A, V=var(Y)=UAU+se2 In that is, by external factors which act on the individuals.
y Y ~ (Xb, V). Therefore, the phenotypical variance (s2f ) is considered
to be the sum of the variances attributable to genetic and
Los animales presentan generalmente una gran va- environmental sources of variation, as well as to their
riabilidad, y esto permite hacer una seleccin de aque- interactions (Falconer, 1989). This can be represented by
llos individuos que se considera podrn mejorar las ca- s2f =V(G+E)=sg2+2sge+se2; where s2f is the variance of
ractersticas de inters. Las variaciones de las caracters- observed or phenotypical values, s2g is the variance of the
ticas observables, llamadas fenotpicas, son el resultado genetic effects among individuals, sge is the genotype by
de un conjunto de efectos genticos de tipo aditivo as environment covariance and se2 is the variance of the
como de sus interacciones, cuya expresin puede ser mo- environmental effects. If it is assumed that there is no
dificada por el medio ambiente en el que se desarrollan correlation between genotype and environment, then
los animales; esto es, por factores externos que actan sge=0 and the variance partition would be
sobre los individuos. Por lo anterior, la varianza fenotpica
(s2f ) es considerada como la suma de las varianzas s2f = s2g + s2e
atribuibles a fuentes de variacin genticas y ambienta-
les, as como de las interacciones entre ellas (Falconer, The main interest of a breeder is to know the
1989). Esto ltimo se puede representar por proportion of the phenotypical differences resulting from
s2f =V(G+E)=sg2+2sge+se2; donde s2f es la varianza de va- genetic effects, because if this proportion is very low or
lores observados o fenotpica, s2g la varianza de los efec- non-existent, the selection programs would be of no use.
tos genticos entre los individuos, sge la covarianza entre The genotypical variance can be divided, according
genotipo y ambiente y se2 la varianza de los efectos am- to the effects of the genes and their interactions, in additive
bientales. Si se supone que no existe correlacin entre el variance (sA2), dominance variance (sD2) and epistatic
genotipo y el ambiente, entonces sge=0 y la particin de
variance (sI2), that is: s2g = sA2+sD2+sI2, therefore, the
la varianza sera
phenotypical variance is s2f =sA2+sD2+sI2+se2 or equivalently,
s2f = s2g + s2e
s 2f s 2A s 2D + s 2I + s 2e , which generates the ratio
= +
El principal inters de un mejorador es conocer la pro- s 2f s 2f s 2f
porcin de las diferencias fenotpicas debida a efectos
s 2A
genticos, ya que si es muy baja o no existe, los progra- h2+c2=1; where h 2 = is the heredity index in the strict
mas de seleccin no tendran sentido. s 2f
CADENA-MENESES y CASTILLO-MORALES: MUESTREO DE GIBBS EN LA ESTIMACIN DE COMPONENTES 347

La varianza genotpica puede ser dividida, de acuer- sense and c2 is the portion of the phenotypical variance
do con los efectos de los genes y las interacciones entre resulting from deviations caused by non-additive genetic
ellos, en varianza aditiva (sA2), varianza de dominancia factors plus the environment.
(sD2) y varianza episttica (sI2), esto es: s2g = sA2+sD2+sI2, Although there are various methods for the estimation
por lo que la varianza fenotpica es s2f =sA2+sD2+sI2+se2 o, of variance components (Searle, 1971; Cadena and
Castillo, 2000a and 2000b among others), here reference
s 2f s 2A s 2D + s 2I + s 2e is made only to the bayesian methods (Gianola et al.,
equivalentemente, = + , lo que 1990).
s 2f s 2f s 2f
Considering equation (1) from the Bayesian point of
view, and the independent residuals of b and x, the vectors
s 2A
genera la relacin h2+c2=1; donde h 2 = es el ndice b and x are formally location parameters, but they can be
s 2f distinguished from one another depending on the relative
de herencia en el sentido estrecho y c2 es la porcin de la state of uncertainty prior to the gathering of data (Gianola
varianza fenotpica que se debe a desviaciones causadas et al., 1990). It is assumed that b is a vector of which
por factores genticos no aditivos ms el ambiente. previous knowledge is totally vague, and to which the
Aunque existen varios mtodos de estimacin de com- investigator is indifferent with respect to the values taken
ponentes de varianza (Searle, 1971; Cadena y Castillo, a priori. On the other hand, x is a vector of which it is
2000a y 2000b entre otros), aqu slo se hace referencia possible to make previous probabilistic statements with
a los bayesianos (Gianola et al., 1990). some degree of precision. These two situations correspond
Considerando la ecuacin (1) desde el punto de vista to the fixed (b) and random (x) effects. While it is possible
bayesiano, y los residuales independientes de b y x, los that b has a fixed significance, there is a randomness which
vectores b y x son formalmente parmetros de localiza- arises from the subjective incertitude about its value. The
cin, pero se distingue entre los dos dependiendo del es- situation is similar to that of x, but here the investigator
tado relativo de incertidumbre previa a la realizacin de has previous experience that can be modeled by a
los datos (Gianola et al., 1990). Se supone que b es un distribution, possibly with unspecified parameters. If x
vector sobre el que el conocimiento previo es totalmente in (1) is a vector of genetic values, under polygenic
vago, y el investigador es indiferente con respecto a los heredity it is reasonable to suppose a normal distribution
valores que toma a priori. Por otro lado, x es un vector for x.
sobre el cual es posible hacer enunciados probabilsticos The a priori non-informative distribution for b is (Box
previos con algn grado de precisin. Estas dos situacio- and Tiao, 1973):
nes corresponden a los efectos fijos (b) y aleatorios (x).
Mientras que es posible que b tenga un significado fijo, p(b) constante
hay una aleatoriedad que proviene de la incertidumbre
subjetiva acerca de su valor. La situacin es similar a la Using the previously suggested argument, and
de x, pero aqu el investigador tiene experiencia previa supposing that in (1) only one variance component is to
que puede ser modelada por una distribucin, posible- be considered, then:
mente con parmetros no especificados. Si x en (1) es un
vector de valores genticos, bajo herencia polignica es x ~ Nt (0, Asx2) (2)
razonable suponer una distribucin normal para x.
La distribucin no informativa a priori para b es (Box that is, x follows a normal t-varied distribution; A is the
y Tiao, 1973): known additive ratio matrix (Henderson, 1984) and s2x is
the variance of the additive genetic effects or of the
p(b) constante transmittance ability, depending on the context. In general,
s2x is unknown, therefore (2) establishes the form of
Usando el argumento sugerido previamente, y supo- distribution but does not necessarily specify the values
niendo que en (1) slo se va a considerar un componente for all parameters. It is assumed that:
de varianza, se tiene:
(Y | b, x, s2e) ~ Nn(X+U, Ise2) (3)
x ~ Nt (0, Asx 2
) (2)
where se2 is the residual variance. In general, se2 is
esto es, x sigue una distribucin normal t-variada; A es la unknown, therefore (3) is a statement on the distributional
matriz conocida de relacin aditiva (Henderson, 1984) y form with all the non-specified parametric values (Gianola
s2x es la varianza de los efectos genticos aditivos o de la et al., 1990).
348 AGROCIENCIA VOLUMEN 36, NMERO 3, MAYO-JUNIO 2002

habilidad de transmisin, dependiendo del contexto. En The model is considered incomplete if the degree of
general, s2x es desconocida, por lo que (2) establece la uncertainty referent to sx2 and se2 is not established. It is
forma de la distribucin pero no necesariamente especi- frequently assumed (Gianola et al., 1990) that, a priori,
fica los valores de todos los parmetros. Se supone que: the variance components follow the independent inverted
chi-squared distributions.
(Y | b, x, s2e) ~ Nn(X+U, Ise2) (3)
a f
donde se2 es la varianza residual. En general se2 es desco- c h c h
p s 2x s 2x
-1/ 2 ux+2
c
exp -uu s x2 / 2s 2x h (4)
nocida, por lo que (3) es un enunciado de la forma
distribucional con todos los valores paramtricos no es- and
pecificados (Gianola et al.,1990).
a f
El modelo se considera incompleto si no se establece c h c h
p s 2e s 2e
-1/ 2 ue+2
c
exp -u e se2 / 2s 2e h (5)
el grado de incertidumbre referente a sx2 y se2. Es comn
suponer (Gianola et al., 1990) que, a priori, los compo- In (4) and (5), sx2(se2) can be interpreted as an a priori
nentes de varianza siguen las distribuciones ji-cuadrada value of sx2(se2), and ux(ue) is a parameter analogous to
invertida independientes. the degrees of freedom expressed by the degree of belief
in the a priori value of the parameter (Chen, 1979). These
a f are hyperparameters of the a priori distribution of the
c h c h
p s 2x s 2x
-1/ 2 ux+2
c
exp -uu s x2 / 2s 2x h (4) variances, in the same way that sx2 is a parameter of the
distribution of x. The choice of an inverted chi-square
distribution for a variance is based on its conjugated
y nature, and to that under certain conditions it appears as
a posterior distribution of the appropriate parameter (Box
a f
c h c h
p s 2e s 2e
-1/ 2 ue+2
c
exp -u e s e2 / 2s 2e h (5)
and Tiao, 1973); furthermore, it simplifies the subsequent
mathematical analysis.
When there is no previous knowledge of the variances,
En (4) (y (5)), sx2(se2) se puede interpretar como un ux and ue can be equaled to zero, in which case the resulting
valor a priori de sx2(se2), y ux(ue) es un parmetro anlogo a priori distributions are:
a los grados de libertad que expresa el grado de creencia
en el valor a priori del parmetro (Chen, 1979). stos p(sx2) sx-2 ; p(se2) se-2
son hiperparmetros de la distribucin a priori de las
varianzas, de la misma manera que sx2 es un parmetro The a priori density of se2 corresponds to the a priori
de la distribucin de x. La eleccin de una distribucin ignorance of Jeffreys (1961) for a variance parameter;
ji-cuadrada invertida para una varianza se basa en su na- the a priori for sx2 will produce essentially the same result
turaleza conjugada y a que bajo ciertas condiciones apa- as one which is uniform. Uniform a priori distributions
rece como una distribucin posterior del parmetro apro- for the variance components can cause technical
piado (Box y Tiao, 1973), adems de simplificar el anli- difficulties in the bayesian analysis (Gianola et al., 1990).
sis matemtico subsecuente. The Bayes theorem (Box and Tiao, 1973) provides
En ausencia de un conocimiento previo sobre las the following expression
varianzas, se pueden igualar a cero ux y ue, en cuyo caso

h pcY | b, x, s h pa bf
las distribuciones a priori se vuelven:
c
p b, x, s 2x , s 2e |Y , s x2 , u x , s e2 , u e 2
e

pc x| s hc s | s , V h pc s | s , v h
p(sx2 ) sx-2 ; p( se2
) se-2 2 2 2 2 2
x e e e x x x

se2
La densidad a priori de corresponde a la ignoran-
cia a priori de Jeffreys (1961) para un parmetro de va- as the posterior density of all variables; the first term on
rianza; la a priori para sx2 producir esencialmente el mis- the right is the likelihood function which is dependent on
mo resultado que una uniforme. Distribuciones a priori se2 but not on sx2.
uniformes para los componentes de varianza pueden cau-
sar dificultades tcnicas en el anlisis bayesiano (Gianola MATERIALS AND METHODS
et al., 1990).
El teorema de Bayes (Box y Tiao, 1973) da la expre- The main purpose of this study was to estimate the variance
sin components of the factors which are considered important for the
CADENA-MENESES y CASTILLO-MORALES: MUESTREO DE GIBBS EN LA ESTIMACIN DE COMPONENTES 349

c h pcY | b, x, s h pa bf
information, consisting of 1308 lactations of Holstein cows in a dairy
p b, x, s 2x , s 2e |Y , s x2 , u x , s e2 , u e 2
e of the Universidad Autnoma Chapingo.

pc x| s hc s | s , V h pc s | s , v h
2 2 2 2 2 The variables considered were: identification of the cow, sire and
x e e e x x x dam of the cow, total milk production of lactation, month and year of
delivery, number of the delivery and age of the dam at delivery. Also
como la densidad posterior de todas las variables; el pri- of interest is the estimation of the variance components of the sire and
mer trmino del lado derecho es la funcin de verosimi- dam of the cow, having as response variable the total production of
litud, la cual depende de se2 pero no de sx2. milk. In summary, there is data for 132 sires, 471 dams and 14 years
of records.
MATERIALES Y MTODOS The analysis was made with the model

El propsito principal de este estudio fue estimar los componen- yijklm = m+Si+D(S)j(i)+Mk+Al+Eijklm+eijklm
tes de varianza de los factores que se consideran importantes para la
informacin, consistente en 1308 lactancias de vacas Holstein de un where Si is the effect of the i-th sire (random), D(S)j(i) is the effect of
establo de la Universidad Autnoma Chapingo. the j-th dam nested in the i-th sire (random), Mk is the effect of the
Las variables consideradas fueron: identificacin de la vaca, pa- k-th month (fixed), Al is the effect of the l-th year (fixed) and Eijklm is
dre y madre de la vaca, produccin total de leche en la lactancia, mes the age of the cow at delivery. Finally, y is the total milk production
y ao de parto, nmero de ste y edad de la vaca al parto. Se tiene and eijklm is the random error associated with each observation.
inters en estimar los componentes de varianza de semental y madre
The Gibbs sampling (GS) is a technique for the indirect generation
de la vaca, teniendo como variable respuesta la produccin total de
of random variables of a distribution, without having to calculate the
leche. En resumen, se cuenta con datos de 132 sementales, 471 ma-
density function (Casella and George, 1992). The GS algorithm is based
dres y 14 aos de registro.
on the generation, in sequence, of variables from each of the complete
El anlisis se realiz con el modelo
conditional densities. Complete conditional density is the density of a
variable given all the other parameters in the model. For example, if
yijklm = m+Si+D(S)j(i)+Mk+Al+Eijklm+eijklm
GS is used to estimate the distributions of f(a|y), f(b|y) or f(a,b|y), the
complete conditional distributions f(a|b,y) and f(b|a,y) are required.
donde Si es el efecto del i-simo semental (aleatorio), D(S)j(i) es el
When GS is used to evaluate any of these densities, an arbitrary initial
efecto de la j-sima madre anidada en el i-simo semental (aleatorio),
value must be chosen, and later, values should be taken from the
Mk es el efecto del k-simo mes (fijo), Al es el efecto del l-simo ao
complete conditional densities in the sequence
(fijo) y Eijklm es la edad de la vaca al parto. Finalmente, y es la produc-
cin total de leche y eijklm el error aleatorio asociado a cada observacin.
an~f(a|bn-1, y) and
bn~f(b|an, y),
El muestreo de Gibbs (MG) es una tcnica para la generacin de
variables aleatorias de una distribucin indirectamente, sin tener que
where ~ indicates that the variable is a random variable of the specified
calcular la densidad (Casella y George, 1992). El algoritmo MG est
distribution, and the superindex refers to the sequence of the values in
basado en la generacin, en secuencia, de variables provenientes de
the GS chain. At the limit of this sequence, the distribution of an
cada una de las densidades condicionales completas. La densidad con-
converges to f(a|y), that of bn to f(b|y), and of the pairs an, bn to that of
dicional completa es la densidad de una variable dados todos los otros
f(a, b|y).
parmetros en el modelo. Por ejemplo, si se usa MG para estimar las
distribuciones de f(a|y), f(b|y) o f(a,b|y) se requieren las distribuciones In the problem of variance component estimation, the joint density
condicionales completas, f(a|b,y) y f(b|a,y). Al usar MG para evaluar of interest is the distribution of the fixed effects, random effects and
cualquiera de estas densidades debe elegirse un valor inicial arbitra- variance components given the data.
rio, y despus extraer valores de las densidades condicionales com- Van Tassell and Van Vleck (1995) developed MTGSAM (Multiple
pletas en la secuencia Trait Gibbs Sampling in Animal Models), which is an ensemble of
programs in FORTRAN for variance component estimation with the
an~f(a|bn-1, y) y animal model using GS. This was the program used to obtain the
bn~f(b|an, y), estimations, which generates a posteriori bayes distributions and
means.
donde ~ indica que la variable es una variable aleatoria de la distribu-
cin especificada, y el superndice se refiere a la secuencia de los va- RESULTS AND DISCUSSION
lores en la cadena de MG. En el lmite de esta secuencia la distribu-
cin de an converge a f(a|y), la de bn a f(b|y), y la de los pares an, bn The first problem was to determine the initial values
a la de f(a, b|y). to be supplied to the program; the number of samplings
350 AGROCIENCIA VOLUMEN 36, NMERO 3, MAYO-JUNIO 2002

En el caso del problema de la estimacin de componentes de va- to be taken in order to obtain an appropriate sample size,
rianza, la densidad conjunta de inters es la distribucin de los efectos as well as the number of samplings to be eliminated, and
fijos, efectos aleatorios y componentes de varianza, dados los datos. the training samples to determine whether the sample
Las densidades marginales de inters en este problema son las distri- already is of the desired distribution. Table 1 shows the
buciones de los efectos fijos, de los efectos aleatorios o de los compo- estimations reached after 1000 iterations, with a training
nentes de varianza dados los datos. sampling of 100 and a selection step of 20. It can be
Van Tassell y Van Vleck (1995) desarrollaron MTGSAM (Multiple observed that except for the initial pairs of values (0.5,
Trait Gibbs Sampling in Animal Models), que es un conjunto de pro- 25000) and (0.5, 250) for sa2, se2, which provide an initial
gramas en FORTRAN para la estimacin de componentes de varianza value of sa2 one hundred times smaller than the value to
con el modelo animal usando MG. ste fue el programa usado para which it converges, combined with an initial value of se2
obtener las estimaciones, el cual genera distribuciones a posteriori de which is one hundred times greater in the first case and
Bayes y medias. of the same magnitude as the final value in the second, in
which there is an evident underestimation, all the others
RESULTADOS Y DISCUSIN converge to similar values in the first run of the program.
Even for the alluded cases, when in the second run the
El primer problema fue determinar los valores inicia- final values of the previous step are taken as initial values,
les que se habran de proporcionar al programa; el nme- appropriate estimations are achieved, although not the
ro de muestreos que habrn de realizarse para obtener un same as with the other initial values.
tamao de muestra apropiado, as como el nmero de Table 2 presents the results of the behavior of the
muestreos que se eliminaran, y las muestras de entrena- estimations with a greater number of samplings, 2000,
miento para considerar que ya la muestra es de la distri- leaving the other values as in the previous situation. The
bucin deseada. En el Cuadro 1 se presentan las estima- results of both tables are similar in the underestimation
ciones a las que se lleg despus de 1000 iteraciones, of the previously mentioned cases. This suggests that the
teniendo un muestreo de entrenamiento de 100 y un paso training sampling can play an important role, which is
de seleccin de 20. En l se puede ver que salvo para los why additional analysis with 2000 samplings were carried
pares de valores iniciales (0.5, 25000) y (0.5, 250) para out, but with a greater training sampling.
sa2, se2 que proporcionan un valor inicial de sa2 que es Table 3 shows the results of the analysis with 2000
cien veces menor que el valor al que se converge, combi- samplings, training of 1100 and selection steps of 20.
nado con un valor inicial de se2 que es cien veces mayor Notice that all the estimations are similar regardless of
en el primer caso y de la misma magnitud que el valor the initial values provided to the program, which
final en el segundo, en los cuales hay una clara subesti- demonstrates the relevance of the training in the Gibbs
macin, todos los dems convergen a valores similares sampling process, taking into account that, with other
en la primera corrida del programa. An para los casos methods, estimations close to 50 for sa2 and 250 for se2
aludidos, en la segunda corrida del mismo, tomando como have been obtained.
valores iniciales a los valores finales del paso anterior, se Of course, to say that the training is relevant does not
llega a estimaciones apropiadas, aunque no las mismas mean that it is determinant. To corroborate this point, some
que con los dems valores iniciales. estimations were made with 1000 samplings and training

Cuadro 1. Estimaciones obtenidas con muestreo de Gibbs para sa2 y s e2 con los valores iniciales indicados, 1000 muestreos, 100 de entrena-
miento y 20 de paso de seleccin entre valores que pasan a la muestra.
Table 1. Estimations obtained with Gibbs sampling for s a2 and se2 with the indicated initial values, 1000 samplings, 100 of training and 20
of selection step among values which pass to the sample.

Par- Valor Primera Segunda Valor Primera Segunda Valor Primera Segunda
metro inicial corrida corrida inicial corrida corrida inicial corrida corrida

sa2 0.5 16.7518 48.9428 50 49.6261 49.6833 5000 49.7908 49.6838


se2 25000 282.773 256.053 25000 255.715 255.689 25000 255.641 255.689

sa2 0.5 17.0713 48.9752 50 49.6854 49.6835 5000 49.7868 49.6838


se2 250 282.494 256.036 250 255.688 255.689 250 255.643 255.689

sa2 0.5 48.5337 49.6795 50 49.7750 49.6838 5000 49.7870 49.6838


se2 2.5 256.279 255.690 2.5 255.648 255.689 2.5 255.643 255.689

Se us como valor inicial la estimacin de la primera corrida.


CADENA-MENESES y CASTILLO-MORALES: MUESTREO DE GIBBS EN LA ESTIMACIN DE COMPONENTES 351

Cuadro 2. Estimaciones obtenidas con muestreo de Gibbs para s a2 y s e2 con los valores iniciales indicados, 2000 muestreos, 100 de entrena-
miento y 20 de paso de seleccin entre valores que pasan a la muestra.
Table 2. Estimations obtained with Gibbs sampling for sa2 and se2 with the indicated initial values, 2000 samplings, 100 of training and 20
of selection step among values which pass to the sample.

Parmetro Valor inicial Estimacin Valor inicial Estimacin Valor inicial Estimacin

sa2 0.5 34.671456 50 48.344401 5000 48.348983


se2 25000 267.37827 25000 256.35644 25000 256.35427

sa2 0.5 34.830752 50 48.346108 5000 48.348877


se2 250 267.24036 250 256.35563 250 256.35431

sa2 0.5 48.297919 50 48.348564 5000 48.348881


se2 2.5 256.37875 2.5 256.35446 2.5 256.35431

Cuadro 3. Estimaciones obtenidas con muestreo de Gibbs para sa2 y s e2 con los valores iniciales indicados, 2000 muestreos, 1100 de entre-
namiento y 20 de paso de seleccin entre valores que pasan a la muestra.
Table 3. Estimations obtained with Gibbs sampling for sa2 and se2 with the indicated initial values, 2000 samplings, 1100 of training and 20
of selection step among values which pass to the sample.

Parmetro Valor Inicial Estimacin Valor Inicial Estimacin Valor Inicial Estimacin

sa2 0.5 46.477135 50 46.477222 5000 46.477222


se2 25000 257.29188 25000 257.29184 25000 257.29184

sa2 0.5 46.477150 50 46.477222 5000 46.477222


se2 250 257.29187 250 257.29184 250 257.29184

sa2 0.5 46.477222 50 46.477222 5000 46.477222


se2 2.5 257.29184 2.5 257.29184 2.5 257.29184

En el Cuadro 2 se presentan los resultados para el of 800, and selection steps 5 and 20. This implies sample
comportamiento de las estimaciones con un mayor n- sizes of 40 and 10, respectively; which are very small
mero de muestreos, 2000, dejando los otros valores como and thus the estimations, especially those of sa2, differ
en la situacin anterior. Los resultados de ambos cuadros from the values obtained in Table 3. The results are shown
son similares en la subestimacin de los casos antes men- in Table 4.
cionados. Esto sugiere que el muestreo de entrenamiento As a complement, a run was made with a sample size
puede jugar un papel importante, por lo que se llevaron a similar to those presented in Table 4, but with a much
cabo otros anlisis con 2000 muestreos pero con un ma- larger training: 50 000 samplings, 49 000 of training and
yor muestreo de entrenamiento. selection step of 20, which generated the estimations
En el Cuadro 3 se presentan los resultados de los an- 44.757416 and 258.248768 for sa2 and se2, plus a second
lisis con 2000 muestreos, entrenamiento de 1100 y pasos run, with the same characteristics as the above, except
de seleccin de 20. Ntese que todas las estimaciones
for the values of the seed for the generation of random
son parecidas sin importar los valores iniciales que se
proporcionen al programa, de donde queda de manifies-
to la relevancia del entrenamiento en el proceso de mues- Cuadro 4. Estimaciones obtenidas con muestreo de Gibbs para s a2
treo de Gibbs; tomando en cuenta que, con otros mto- y s e2 con los valores iniciales indicados, 1000 muestreos
dos, se han obtenido estimaciones cercanas a 50 para sa2 y muestra de entrenamiento de 800 .
Table 4. Estimations obtained with Gibbs sampling for sa2 and s e2
y a 250 para se2. with the indicated initial values, 1000 samplings and
Desde luego, que el entrenamiento sea relevante no training sample of 800.
significa que sea determinante. Para corroborar esto se
hicieron algunas estimaciones con 1000 muestreos y en- Separacin Parmetro Valores iniciales Estimacin
trenamiento de 800 y pasos de seleccin 5 y 20. Esto
5 sa2 43.0 37.943590
implica tamaos de muestra de 40 y 10, respectivamen- se2 260.0 261.487099
te; los cuales son muy pequeos y, por ende, las estimacio- 20 sa2 50.0 37.943590
nes, sobre todo las de sa2, difieren de los valores obteni- se2 250.0 261.487099
dos en el Cuadro 3. En el Cuadro 4 se presentan los 5 sa2 46.5 37.943590
resultados. se2 257.29 261.487099
352 AGROCIENCIA VOLUMEN 36, NMERO 3, MAYO-JUNIO 2002

De manera complementaria se hizo una corrida con numbers, resulting in the estimations 54.334342 and
un tamao de muestra similar a los que se presentan en el 258.248768 for sa2 and se2. It can be seen that using large
Cuadro 4, pero con un entrenamiento considerablemente trainings with small sample sizes does not improve the
mayor: 50 000 muestreos, 49 000 de entrenamiento y estimations, especially those of sa2.
paso de seleccin de 20, lo que gener las estimaciones The next step was to carry out nine runs of 5000
44.757416 y 258.248768 para sa2 y se2, mas una segunda iterations, all with a training of 1500, but changing the
corrida, con las mismas caractersticas de la ltima men- selection steps of observations that pass to the sample.
cionada, excepto por los valores de la semilla para la ge- Three seeds were used, generating three estimation
neracin de nmeros aleatorios, dando las estimaciones groups. Table 5 shows that when the seeds are changed,
54.334342 y 253.624353 para sa2 y se2. Se puede ver que the results also change; but when the seed is not changed,
usar muestras de entrenamiento grandes con tamaos de the estimations arrived at are identical for the three
muestra pequeos no mejora las estimaciones, sobre todo selection steps of the observations which pass to the
las de sa2. sample.
El siguiente paso fue llevar a cabo nueve corridas de Because the estimation values change when the seed
5000 iteraciones, todas con un entrenamiento de 1500 is modified, two series of runs were planned. The first
pero cambiando los pasos de seleccin de observaciones series included 50 000 samplings, 5000 of training and
que pasan a la muestra. Se usaron tres semillas, lo que selection step of 15 among values which pass to the
genera tres grupos de estimacin. En el Cuadro 5 se ve sample. The second series consisted of 100 000 samplings,
que al cambiar las semillas cambian los resultados; pero 55 000 of training and selection step of 15, generating in
para una misma semilla las estimaciones a las que se lle- all cases groups of three thousand observations which
ga son idnticas para los tres pasos de seleccin de las constitute the samples. The differences between these two
observaciones que pasan a la muestra. groups reside in the training, and within these, in the
Como los valores de las estimaciones cambian al mo- values of the seeds, which were different in all cases.
dificar la semilla, se planificaron dos series de corridas. Tables 6 and 7 show the results corresponding to these
La primera con 50 000 muestreos, 5000 de entrenamien- two groups of analysis.
to y paso de seleccin de 15 entre valores que pasan a la As a complement to Table 6, an additional run was
muestra. La segunda con 100 000 muestreos, 55 000 de made with the same characteristics, except that the training
entrenamiento y paso de seleccin de 15, generndose was of 10 000, which implies a sample size of 6000 (twice
en todos los casos conjuntos de tres mil observaciones that of Table 6), obtaining estimations of 49.248781 and
que constituyen las muestras. Las diferencias entre estos 256.030962 for sa2 and se2. Table 6 presents a wider range
dos grupos radican en el entrenamiento y dentro de stos of values of the estimations of sa2, which run from
en los valores de las semillas, que en todos los casos fue- 48.161434 to 49.420825. However, in Table 7 the values
ron diferentes. En los Cuadros 6 y 7 se presentan los re- vary from 48.579004 to 49.417899. That is, both generate
sultados correspondientes a estos dos grupos de anlisis. estimations of around 49.0, but with less dispersion in
Como complemento al Cuadro 6 se realiz una corri- the second case. Finally, a run was made with 500 000
da adicional con las mismas caractersticas, salvo que el
entrenamiento fue de 10 000, lo que implica un tamao
Cuadro 6. Estimaciones obtenidas con muestreo de Gibbs para sa2
y s e2 con 50 000 muestreos, 5000 de entrenamiento, paso
de seleccin de 15 y valores iniciales de 50.0 y 250.0.
Cuadro 5. Estimaciones obtenidas con muestreo de Gibbs para s a2 Table 6. Estimations obtained with Gibbs sampling for s a2 and s e2
y se2 con 5000 muestreos, 1500 muestras de entrenamien- with 50 000 samplings, 5000 of training, selection step of
to y con valores iniciales de 50.0 y 250.0. 15 and initial values of 50.0 and 250.0.
Table 5. Estimations obtained with Gibbs sampling for s a2 and s e2,
with 5000 samplings, 1500 training samples and initial Corrida Estimaciones Corrida Estimaciones
values of 50.0 and 250.0.
1 48.513495 7 49.040335
Separacin Primera Segunda Tercera 256.354716 256.140927
(n) semilla semilla semilla 2 48.762749 8 49.136132
256.292229 256.017504
20 48.726048 50.232934 51.382854 3 48.557581 9 48.161434
(175) 256.097532 255.316564 254.786773 256.333723 256.625567
4 49.329297 10 49.420825
10 48.726048 50.232934 51.382854 255.988522 255.917900
(350) 256.097532 255.316564 254.786773 5 48.704748 11 48.900738
256.253850 256.238470
5 48.726048 50.232934 51.382854 6 49.131911 12 49.019473
(700) 256.097532 255.316564 254.786773 256.012174 256.167617
CADENA-MENESES y CASTILLO-MORALES: MUESTREO DE GIBBS EN LA ESTIMACIN DE COMPONENTES 353

de muestra de 6000 (el doble que en el Cuadro 6) obte- Cuadro 7. Estimaciones obtenidas con muestreo de Gibbs para s a2
nindose estimaciones de 49.248781 y 256.030962 para y se2 con 100 000 muestreos, 55 000 de entrenamiento,
paso de seleccin de 15 y valores iniciales de 50.0 y 250.0.
sa2 y se2. En el Cuadro 6 se cubre una gama ms amplia de Table 7. Estimations obtained with Gibbs sampling for sa2 and s e2
valores de las estimaciones de sa2, los que van de with 100 000 samplings, 55 000 of training, selection step
48.161434 a 49.420825; en cambio, en el Cuadro 7 los of 15 and initial values of 50.0 and 250.0.
valores varian de 48.579004 a 49.417899; esto es, am-
Corrida Estimaciones Corrida Estimaciones
bos generan estimaciones alrededor de 49.0, pero en el
segundo caso la dispersin es menor. Finalmente se rea- 1 48.711588 4 48.676268
liz una corrida con 500 000 iteraciones, con un entre- 256.272606 256.262469
namiento de 410 000 y paso de seleccin de 15, lo que 2 49.417899 5 49.336090
255.889876 255.970973
gener una muestra de tamao 6000; con los mismos 3 48.579004 6 48.894364
valores iniciales que se han venido manejando: 50.0 y 256.333130 256.097837
250.0. Los resultados obtenidos en esta ltima estima-
cin son 49.073588 para sa2 y 256.103606 para se2, con-
gruentes con el razonamiento previamente presentado, iterations, training of 410,000 and selection step of 15,
tenindose una estimacin de la heredabilidad (h2) de which generated a sample size of 6000; with the same
0.1608. initial values which have been employed throughout: 50.0
and 250.0. The results obtained in this last estimation are
CONCLUSIONES 49.073588 for sa2 and 256.103606 for se2, which are
consistent with the previously presented reasoning, giving
El MTGSAM es un paquete que produce estimacio- an estimation of inheritability (h2) of 0.1608.
nes adecuadas de los componentes de varianza en mode-
los mixtos de produccin animal si se especifica el pedigr CONCLUSIONS
de cada animal. En el modelo ajustado, con 132 sementales,
471 madres y 14 aos de registro, se obtuvo convergencia MTGSAM is a program which produces adequate
con 5000 muestreos y paso de seleccin de 20. estimations of the variance components in mixed models
No se observ influencia del muestreo de entrena- of animal production if the pedigree of each animal is
miento en las estimaciones a partir de 1100 rondas, pero specified. In the fitted model, with 132 sires, 471 dams
s hubo influencia del nmero de muestreos cuando fue and 14 years of records, convergence was obtained with
menor de 2000. 5000 samplings and selection step of 20.
Se tiene influencia de la semilla para la generacin No influence was observed of the training sampling
de los nmeros aleatorios, la que genera estimaciones di- on the estimations after 1100 rounds; however, there was
ferentes aun para corridas con 100 000 muestreos, que influence of the number of samplings when it was less
generan muestras de tamao 6000. Las diferencias ob- than 2000.
servadas fueron 0.838895 para sa2 y 0.443254 para se2, lo The seed has influence on the generation of the
que representa 1.7259% de la primera y 0.1732% de la random numbers, which generates different estimations
segunda. even for runs with 100 000 samplings, which generate
Si no se cuenta con la informacin previa adecuada sample sizes of 6,000. The differences observed were
puede producirse una sobreestimacin de los parmetros, 0.838895 for sa2 and 0.443254 for se2, which represent
originada por una distribucin a priori impropia unifor- 1.7259% of the first and 0.1732% of the second.
me de cero a infinito; y aunque posteriormente influye If adequate previous information is not available, an
sobre ella la verosimilitud, al final se sobreestimarn los overestimation of the parameters may occur, provoked
parmetro. by an improper a priori uniform distribution from zero
to infinity; and although the likelihood has an influence
LITERATURA CITADA later on, in the end the parameters will be overestimated.

Box, G. E. P., and G. C. Tiao. 1973. Bayesian Inference in Statistical End of the English version
Analysis. Addison-Wesley, Reading. 463 p.
Cadena-Meneses, J. A., y A. Castillo-Morales. 2000a. Una compara-
cin de SAS y Harvey en la estimacin de componentes de va-
pppvPPP
rianza en modelos mixtos. Agrociencia 34: 57-68.
Cadena-Meneses, J. A., y A. Castillo-Morales. 2000b. Una compara- Chen, C. F. 1979. Bayesian inference for a normal dispersion matrix
cin de la estimacin de componentes de varianza mediante si- and its application to stochastic multiple regression analysis.
mulacin. Agrociencia 34: 343-352. Journal of the Royal Statistical Society B 41: 235-248.
Casella, G., and E. I. George. 1992. Explaining the Gibbs Sampler. Falconer, D. S. 1989. Introduction to Quantitative Genetics, Third
The American Statistician 46: 167-174. Edition. Longman Scientific and Technical, London. 438 pp.
354 AGROCIENCIA VOLUMEN 36, NMERO 3, MAYO-JUNIO 2002

Gianola, D., S. Im, and F. W. Macedo. 1990. A framework for prediction Jeffreys, H. 1961. Theory of Probability. Clarenton Press, Oxford.
of breeding values. In: Advances in Statistical Methods for Genetic 470 pp.
Improvement of Livestock. Gianola, D., and K. Hammomd (eds.). Searle, S. R. 1971. Topics in variance components estimation.
Springer-Verlag. Berlin. pp: 210-238. Biometrics 27: 1-76.
Henderson, C. R. 1984. Applications of Linear Models in Animal Van Tassel, C. P., and D. L. Van Vleck. 1995. A Manual for Use of
Breeding. University of Guelph. 462 p. MTGSAM. USDA. ASR. Draft. 86 p.

S-ar putea să vă placă și