<div dir="ltr"><p class="MsoNormal" style="text-align:justify"><font face="Times New Roman, serif"><span style="font-size:16px;line-height:18.4px">Olá,</span></font></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">eu gostaria de saber se é possível usar estruturas de correlação nos resíduos quando ajusto modelos não-lineares em mensurações de dados de produção de gases <i>in vitro</i> (caracterizado por mensurações acumuladas ao longo do tempo) e sem repetição.</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Breve descrição do banco de dados de gases <i>in vitro</i>: o experimento foi conduzido em frascos de (125 mL)  que contem fruído ruminal com feno de alfalfa. Esses frascos são acoplados aos sensores que medem pressão dos gases no interior dos frascos com o conversor digital que registra automaticamente a cada 5 minutos, durante o período de 48 horas. As mensurações dos gases são, portanto acumuladas ao longo do tempo. Tenho quatro compostos (amostras) diferentes que chamei de (y, y2, y3 e y4), em que cada uma amostra contem 577 mensurações ao longo do tempo (x) que é dado em horas.</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Eu preciso ajustar modelos não-lineares  para cada amostra (exponencial, logístico e logístico bicompartimental). O modelo logístico bicompartimental foi o que melhor se ajustou sem usar estrutruras de correlação, porém, a análise residual possuí uma forte dependência (visto que os dados são acumulados, ou seja, a mensuração no tempo (t+1) depende da mensuração anterior do tempo t.</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Então, eu teria que entrar com estruturas de correlações no modelo logístico bicompartimental para melhorar a análise residual? </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"><br></span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> Eu tentei algumas estruturas usando o argumento “correlation”, da função gnls. No quadro abaixo segue o seguinte resumo das estruturas inseridas no modelo, com os respectivos resultados gerados pela FAC ou os erros retornados pelo software R.</span></p><table border="1" cellspacing="0" cellpadding="0" width="619" style="width:464.5pt;border-collapse:collapse;border:none"><tbody><tr><td width="151" valign="top" style="width:113.15pt;border:1pt solid black;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">modelo</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:solid solid solid none;border-top-color:black;border-right-color:black;border-bottom-color:black;border-top-width:1pt;border-right-width:1pt;border-bottom-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">correlation</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:solid solid solid none;border-top-color:black;border-right-color:black;border-bottom-color:black;border-top-width:1pt;border-right-width:1pt;border-bottom-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Erros</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:solid solid solid none;border-top-color:black;border-right-color:black;border-bottom-color:black;border-top-width:1pt;border-right-width:1pt;border-bottom-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">FAC - residual</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M1</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">sem estrutrura de correlação</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Sem erro</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Tendência : possivelmente independência e heterogeneidade</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M2</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">AR1: corAR1()</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">Erro: step halving factor reduced below minimum in NLS step</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M3</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">AR1: corAR1(form=~x)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Sem erro</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Tendência : possivelmente independência e heterogeneidade</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M4</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">AR2: corAR1(p=2, q=0)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Coefficient matrix not invertible</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M5</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">ARIMA: corARMA(p=2,q=1)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">step halving factor reduced below minimum in NLS step</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M6</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">ARIMA: corARMA(p=2,q=2)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Coefficient matrix not invertible</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M7</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">ARIMA: corARMA(p=3,q=1)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">Coefficient matrix not invertible</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr><tr><td width="151" valign="top" style="width:113.15pt;border-style:none solid solid;border-right-color:black;border-bottom-color:black;border-left-color:black;border-right-width:1pt;border-bottom-width:1pt;border-left-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">M8</span></p></td><td width="187" valign="top" style="width:140.35pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span lang="PT-BR" style="font-size:12pt;font-family:'Times New Roman',serif">AR(): corAR1(form=~1)</span></p></td><td width="130" valign="top" style="width:97.8pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">Erro: step halving factor reduced below minimum in NLS step</span></p></td><td width="151" valign="top" style="width:113.2pt;border-style:none solid solid none;border-bottom-color:black;border-bottom-width:1pt;border-right-color:black;border-right-width:1pt;padding:0cm 5.4pt"><p class="MsoNormal" align="center" style="margin-bottom:0.0001pt;text-align:center"><span style="font-size:12pt;font-family:'Times New Roman',serif">-</span></p></td></tr></tbody></table><p class="MsoNormal"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Observação:  Eu fiz a análise usando a metodologia de séries temporais (modelo linear não estacionário – com uma diferença d=1) e a FAC e FACP mostraram que os resíduos eram ruído branco, como nos  modelos ARIMA(p=1, d=1, q=0),  ARIMA(p=2, d=1, q=0) e ARIMA(p=3, d=1, q=0). Seria possível ajustar modelos não-lineares (logístico bicompartimental) usando estruturas de correlações como o ARIMA?</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Os dados e o script seguem em anexo com todos os modelos que tentei ajustar (somente para uma amostra, ou seja, correspondente as colunas chamadas de y e x). Agradeço se puderem me dar uma orientação.</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">rm(list=ls(all=TRUE))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#pacotes necessários para a análise.</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">require(manipulate)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">require(nlstools)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">require(car)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">require(nlme)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">require(lmtest)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># modelos estudados</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#a * (1 - exp(-b * (t - c))) # modelo exponencial</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#a /(1+exp(2+4*b*(c-t)))     # modelo logistico</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#a/(1+exp(2+4*b*(c-t)))+d/(1+exp(2+4*e*(c-t)))  # modelo logistico 2 pool</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#-----------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">setwd('E:\\autoregressivo_modelo')</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">gas01<-read.csv("gas.csv",sep = ",", header = TRUE)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">gas01</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">head(gas01)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">attach(gas01)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">t=Time/60    # para deixar o tempo em horas</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">dim(gas01)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">gas=cbind(gas01,t)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">names(gas) <- c("Time","y","y2","y3", "y4", "x") # variáveis que quero ajustar y (variavel dependente gases) e x o tempo em horas</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">head(gas)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">dim(gas)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">attach(gas)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#===================================================================</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste usando o gnls</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">#Ajuste do modelo exponencial -lote I considerando os erros independentes</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod1 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas, start=c(a=1.1179, b=0.0562, c=-9.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod1) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod1), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod1)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod1)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - AR()</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod2 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corAR1(),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=0.78, b=0.06, c=-5.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod2) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod2), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod2)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod2)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(x,mod2$residuals)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod2)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># ------------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - AR()</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod3 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corAR1(form=~x),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=0.78, b=0.06, c=-5.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod3) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod3), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod3)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod3)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(x,mod3$residuals)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot( ACF(mod3, maxLag =24), alpha = 0.05 )</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># ------------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - AR2()</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod4 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corARMA(p=2,q=0),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=0.78, b=0.06, c=-5.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod4) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod4), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod4)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod4)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot( ACF(mod4, maxLag =24), alpha = 0.05 )</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># ------------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - ARIMA(p=2,q=1)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod5 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corARMA(p=2,q=1),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=1.1179, b=0.0562, c=-9.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod5) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod5), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod5)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod5)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot( ACF(mod5, maxLag =24), alpha = 0.05 )</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># ------------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - ARIMA(p=2,q=2)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod6 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corARMA(p=2,q=2),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=1.1179, b=0.0562, c=-9.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod6) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod6), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod6)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod6)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot( ACF(mod6, maxLag =24), alpha = 0.05 )</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># ------------------------------------------------------------------------</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"># Ajuste do modelo Logístico 2 pool considerando - ARIMA(p=3,q=1)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">mod7 <- gnls(y ~ a/(1+exp(2+4*b*(c-x)))+d/(1+exp(2+4*e*(c-x))),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">data=gas,correlation=corARMA(p=3,q=1),</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">start=c(a=1.1179, b=0.0562, c=-9.5923, d=0.367, e=0.0226))</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">summary(mod7) # quadro de estimativas</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">R2(residuals(mod7), gas$y)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">residuosnI<-summary(mod7)$resid</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">shapiro.test(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">ks.test(rnorm(577),residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot(mod6)</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">hist(residuosnI)</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">plot( ACF(mod7, maxLag =24), alpha = 0.05 )</span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif"> </span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Agradeço desde já,</span></p><p class="MsoNormal" style="text-align:justify"><span lang="PT-BR" style="font-size:12pt;line-height:18.4px;font-family:'Times New Roman',serif">Adriele.</span></p><font color="#888888"></font><div><br></div>-- <br><div class="gmail_signature"><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>Doutoranda 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) 8861-0619.</span></div></div>
</div>