<font face="trebuchet ms,sans-serif">Um CMR na primeira mensagem teria
resolvido a questão. Veja a comparação entre Anova(, type="III") e
drop1() que foi minha sugestão. Verifique se "batem".<br><br><span style="font-family:courier new,monospace">da <- expand.grid(bloco=gl(4,1), A=gl(3,1), B=gl(5,1))<br>
da$y <- rnorm(da$A)<br>set.seed(123)<br>da$y[sample(1:nrow(da), 5)] <- NA<br>da <- na.omit(da)<br>xtabs(~A+B, da) # observações perdidas<br><br>m0 <- lm(y~bloco+A*B, da)<br>anova(m0)<br>car::Anova(m0, type="II")<br>
car::Anova(m0, type="III")<br>drop1(m0, test="F", scope=.~.) # idem ao type="III"<br><br>db <- expand.grid(bloco=gl(4,1), A=gl(3,1), B=gl(5,1))<br>db$y <- rnorm(db$A)<br>db <- subset(db, A!="1" | B!="1")<br>
db <- na.omit(db)<br>xtabs(~A+B, db) # casela pedida<br><br>m1 <- lm(y~bloco+A*B, db)<br>anova(m1)<br>car::Anova(m1, type="II")<br>car::Anova(m1, type="III") # erro<br>summary(m1) # tem NA<br>drop1(m1, test="F", scope=.~.) # sem problemas<br>
</span><br>À disposição.<span class="HOEnZb"><font color="#888888"><br>Walmes.<br><br clear="all"></font></span></font><div class="yj6qo ajU"><div id=":1ew" class="ajR" tabindex="0"><img class="ajT" src="https://mail.google.com/mail/images/cleardot.gif"></div>
</div><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Walmes Marques Zeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">Departamento de Estatística - Universidade Federal do Paraná</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">fone: (+55) 41 3361 3573</span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">VoIP: (3361 3600) 1053 1173</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">e-mail: <a href="mailto:walmes@ufpr.br" target="_blank">walmes@ufpr.br</a><br>
skype: walmeszeviani<br style="font-family:trebuchet ms,sans-serif"></span><span style="font-family:trebuchet ms,sans-serif">twitter: @walmeszeviani</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">homepage: <a href="http://www.leg.ufpr.br/%7Ewalmes" target="_blank">http://www.leg.ufpr.br/~walmes</a></span><br style="font-family:trebuchet ms,sans-serif">
<span style="font-family:trebuchet ms,sans-serif">linux user number: 531218</span><br style="font-family:trebuchet ms,sans-serif"><span style="font-family:trebuchet ms,sans-serif">==========================================================================</span>