<p dir="ltr">Caros colegas.<br></p>
<p dir="ltr">Estou com dados de um experimento realizado em esquema de parcela subdividida em delineamento inteiramente casualizado. Há dois fatores experimentais A ( 2 níveis) e B (dois níveis) e a resposta Y foi medida repetidamente em tempos diferentes ( 23 tempos), sendo o tempo a subparcela. Eu pretendo analisá-lo através de Modelo Misto, utilizando a função lme{nlme}. </p>
<p dir="ltr">Ao analisá-los utilizando a função lme{ nlme}, a função converge, porém recebo mensagens de warnings , avisando que NA's foram produzidos<br></p>
<p dir="ltr">modelo0 <- lme(GAS~HIDRAT*DILU*TEMP,random=~1|TEMP,weights=varIdent(form=~1|TEMP),data=dados)<br></p>
<p dir="ltr">ℝ> anova(modelo0)<br>
numDF denDF F-value p-value<br>
(Intercept) 1 368 5594.089 <.0001<br>
HIDRAT 1 368 246.749 <.0001<br>
DILU 1 368 2.667 0.1033<br>
TEMP 22 0 206.379 <b>NaN</b><br>
HIDRAT:DILU 1 368 6.346 0.0122<br>
HIDRAT:TEMP 22 368 4.199 <.0001<br>
DILU:TEMP 22 368 0.374 0.9961<br>
HIDRAT:DILU:TEMP 22 368 0.038 1.0000<br>
Warning message:<br>
In pf(Fval[i], nDF[i], dDF[i]) : NaNs produzidos<br></p>
<p dir="ltr">O mesmo <b>não</b> ocorre quando eu utilizo a função lmer{lmerTest}<br></p>
<p dir="ltr">modelo <-lmer(GAS~HIDRAT*DILU*TEMP + (1|TEMP),REML=FALSE,data=dados)<br></p>
<p dir="ltr">ℝ> anova(modelo)<br>
Analysis of Variance Table of type III with Satterthwaite <br>
approximation for degrees of freedom<br>
Sum Sq Mean Sq NumDF DenDF F.value Pr(>F) <br>
HIDRAT 2163 2163.24 1 150285 330.58 < 2.2e-16 ***<br>
DILU 52 52.32 1 150285 8.00 0.004689 ** <br>
TEMP 32798 1490.80 22 150285 227.82 < 2.2e-16 ***<br>
HIDRAT:DILU 21 20.66 1 150285 3.16 0.075610 . <br>
HIDRAT:TEMP 215 9.77 22 150285 1.49 0.064140 . <br>
DILU:TEMP 78 3.53 22 150285 0.54 0.960247 <br>
HIDRAT:DILU:TEMP 3 0.13 22 150285 0.02 1.000000 <br>
---<br>
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1<br></p>
<p dir="ltr">A questão é que meus dados são heterocedasticos e gostaria de utilizar a função lme{nlme} devido as facilidades implementadas para lidar com dados assim. Procurei na literatura e estas facilidades ainda não se encontram implementadas na função lmer.<br></p>
<p dir="ltr">Segue CMR</p>
<p dir="ltr">dados<-structure(list(HIDRAT = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, <br>
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, <br>
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, <br>
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, <br>
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, <br>
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, <br>
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, <br>
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, <br>
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, <br>
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, <br>
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("1", "12"), class = "factor"), <br>
DILU = structure(c(1L, 1L, 1L, 1L, 1L, 2L, 2L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3L, 4L, 5L), .Label = c("1", "2", "3", <br>
"4", "5"), class = "factor"), GAS = c(4.61, 1.91, 0.16, 2.33, <br>
2.64, 0.51, 2.02, 0.48, 1.44, 2.74, 7.24, 5.03, 0.8, 3.61, <br>
7.02, 1.15, 4.7, 1.82, 2.75, 6.8, 8.13, 7.54, 1.49, 3.77, <br>
9.61, 1.48, 7.2, 2.94, 3.59, 9.18, 8.64, 9.84, 4.03, 4.35, <br>
11.67, 1.75, 9.23, 5.81, 3.96, 10.68, 9.27, 13.17, 6.77, <br>
5.72, 13.18, 2.12, 11.49, 7.9, 4.92, 11.84, 9.99, 15.55, <br>
9.31, 7.53, 15.36, 2.42, 13.21, 9.67, 6.44, 13.17, 13.48, <br>
18.07, 14.69, 10.65, 19.52, 4.92, 18.46, 15.12, 9.48, 16.46, <br>
16.96, 23.01, 20.95, 13.55, 24.01, 8.67, 23.56, 19.49, 12.43, <br>
5.7, 5.11, 3.4, 4.73, 4.72, 4.05, 6.88, 4.78, 5.05, 4.5, <br>
9.25, 9.92, 6.04, 7.96, 8.62, 7.12, 11.49, 8.4, 9.63, 8.89, <br>
10.88, 13.5, 8.78, 8.6, 10.38, 8.66, 15.73, 11.27, 10.73, <br>
11.02, 12.32, 16.06, 13.49, 9.42, 11.79, 9.82, 18.54, 16.25, <br>
11.85, 12.44, 14.08, 19.72, 17.72, 10.98, 13.25, 11.11, 21.55, <br>
19.76, 13.42, 13.37, 15.35, 22.71, 20.94, 12.7, 15.21, 12.21, <br>
24.21, 22.36, 15.45, 14.53, 21.57, 26.13, 28.41, 16.8, 19.97, <br>
17.38, 29.57, 29.18, 19.7, 17.78, 28.34, 31.73, 36.12, 22.04, <br>
24.64, 24.89, 35.99, 35.4, 24.09, 21.46)), .Names = c("HIDRAT", <br>
"DILU", "TEMP", "BLOC", "GAS"), row.names = c(NA, -159L), class = "data.frame")<br></p>
<p dir="ltr">install.packages(c("nlme","lmerTest")) #instale caso não tenha instalado em seu sistema</p>
<p dir="ltr">library(nlme)</p>
<p dir="ltr">library (lmerTest)</p>
<p dir="ltr">modelo0 <- lme(GAS~HIDRAT*DILU*TEMP,random=~1|TEMP,weights=varIdent(form=~1|TEMP),data=dados)</p>
<p dir="ltr">modelo <-lmer(GAS~HIDRAT*DILU*TEMP + (1|TEMP),REML=FALSE,data=dados)</p>
<p dir="ltr">==============================</p>