<div dir="ltr"><p class="MsoNormal" style="text-align:justify"><font face="times new roman, serif"><span style="font-size:16px">Olá pessoal,</span></font></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span style="font-family:"times new roman",serif;font-size:12pt">tenho uma dúvida com
relação à geração de variáveis aleatórias normais multivariadas no R.</span><br></p>

<p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif">Eu gostaria de gerar
duas variáveis aleatórias (x1, x2) usando distribuição normal multivariada com
estrutura de correlação entre elas. A Estrutura da matriz de correlação foi
estimada antes com base num banco de dados reais (com correlação fraca de - 0.2).
Porém, essas variáveis não podem ser negativas, Ex. x1 tem média e variância,
respectivamente, iguais a 0.0067 e 0.0017; x2 tem média e variância,
respectivamente, iguais a 0.1374 e 0.0024. Eu gero as variáveis da seguinte forma:</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif"><br></span></p>

<p class="MsoNormal" style="text-align:justify"><u><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif">Programa usado no R:<span></span></span></u></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">#
Simulando os parâmetros com estrutura de correlação entre eles<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">n
<- 1000  # tamanho da amostra gerada<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">p
<- 2  # numero de variáveis a serem
geradas<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">library(MASS)<span></span></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif"># construíndo a matriz de correlação para usar nas simulações, baseadas na característica da amostra coletada</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">mu<-rep(0,
times = p)<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">rho
<-   - 0.2             # correlacao
negativa <span></span></span><span style="font-family:"times new roman",serif;font-size:16px">- 0.2</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">sigma2
<- 1<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">Sigma
<- sigma2 * ((1-rho)*diag(p)+rho*matrix(1, p, p))<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">X1
<- 0.0096  # Media da variavel x1<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">X2
<- 0.1203 # <span></span></span><span style="font-family:"times new roman",serif;font-size:16px">Media da variavel x2</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">media
<- c(X1,X2)<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">y  <-  mvrnorm(n, media, Sigma)<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span lang="EN-US" style="font-size:12pt;font-family:"times new roman",serif">cor(y)<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span lang="EN-US" style="font-size:12pt;font-family:"times new roman",serif">apply(y, 2,
mean)<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif">y<span></span></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [1,]  0.309910452  1.0642521083</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [2,] -0.251583312  1.8909032058</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [3,]  1.330362012 -1.1239501814</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [4,] -0.793399464 -1.5433056284</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [5,]  2.165144843 -0.2645184534</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [6,]  0.532777085  1.0910864562</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [7,] -1.612135390  2.0489354648</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">   [8,] -0.430529913  1.0312062602</span></font></p><p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><font face="times new roman, serif"><span style="font-size:16px">...</span></font></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span style="font-size:12pt;font-family:"times new roman",serif"><span> </span></span></p>

<p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif">Quando gero as
simulações para x1 e x2 usando a função <i>mvrnorm</i>,
o resultado me retorna alguns valores negativos para as variáveis, isso não
poderia ocorrer. Teria alguma outra função em que eu possa fornecer a variância
de cada uma dessas variáveis, além da estrutura de correlação? Como poderia
contornar essa situação, usando o R?<span></span></span></p>

<p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif"><span> </span></span></p>

<p class="MsoNormal" style="text-align:justify"><b><u><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif">Obs:</span></u></b><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif">
No SAS, a seguinte programação funciona perfeitamente:<span></span></span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:115%;font-family:"times new roman",serif"><br></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">proc</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">iml</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">wrksize=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">100000</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">K=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">2</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">N=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1000</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">; </span><span style="font-size:18pt;font-family:"courier new";color:green;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">/* tamanho da amostra
*/</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">M={</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">};<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">S={ </span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">       -</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.5283</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">   -</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.5283</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">       </span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
};<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">X=shape(</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,K,N);<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">ME=</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;
SI=</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">DO</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
I=</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> </span><span style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">TO</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> K;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">  </span><span style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">DO</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
J=</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> </span><span style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">TO</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> N;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">    </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">if</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> I></span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">      </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">then</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">        do;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">        
ME=M[I]+(S[</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,I])`*(inv(S[</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">])*(X[</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,J]-M[</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">]));<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">         </span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">SI=S[I,I]-(S[</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,I])`*(inv(S[</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">])*(S[</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:I-</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">1</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">,I]));<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">        </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">end</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">   
X[I,J]=ME+NORMAL(</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">)*SQRT(SI);<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">  </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">END</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">END</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Z=t(X);<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">varnames=</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:purple;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">'X1'</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">:</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:purple;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">'X2'</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">create</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
NOVO </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">from</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> Z[colname=varnames];<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">append</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">from</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> Z;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">quit</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">data</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
MEXT; </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">set</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> NOVO;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">options</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">ps</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">66</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">ls</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">75</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">   X1=</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.0067</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">+</span><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.0017</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">*X1; </span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:green;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">/* normal */</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> <span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">   </span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">X2=</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.1374</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">+</span><b><span style="font-size:18pt;font-family:"courier new";color:teal;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">0.0024</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">*X2;
</span><span style="font-size:18pt;font-family:"courier new";color:green;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">/* normal */</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> <span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span> </span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><b><span style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">proc</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
</span><b><span style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">corr</span></b><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"> </span><span style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">data</span><span style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">=MEXT;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:blue;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">var</span><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">
X1 X2;<span></span></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:navy;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">run</span></b><span lang="EN-US" style="font-size:18pt;font-family:"courier new";color:black;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">;<span></span></span></p><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div style="font-family:times,serif;margin:0cm 0cm 0.0001pt;font-size:16px"><span style="white-space:pre"> </span>Adriele Giaretta Biase.</div><div style="font-family:times,serif;margin:0cm 0cm 0.0001pt;font-size:16px"><span style="white-space:pre">      </span>Mestre em  Estatística e Experimentação Agropecuária - UFLA. <br><span style="white-space:pre">        </span>Doutora em Estatística e Experimentação Agronômica - ESALQ/ USP</div><div style="font-family:times,serif;margin:0cm 0cm 0.0001pt;font-size:16px"><span style="font-size:12pt;white-space:pre">  </span><span style="font-size:12pt">Contato: (19) 98861-0619.</span></div></div></div></div></div></div>
</div>