<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Agradeço novamente por sua ajuda Emmanuel.<div><br></div><div>Att.</div><div><br></div><div>Tiago.<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Mon, 26 Nov 2012 11:32:08 -0800<br>From: emmanuelarnhold@yahoo.com.br<br>To: r-br@listas.c3sl.ufpr.br<br>Subject: Re: [R-br] Fatorial com parcelas perdidas<br><br><div style="color:#000;background-color:#fff;font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3">Você
pode usar aov. A diferença esta na função para obter a análise de
variância. Você usaou anova(). Veja a função Anova() do pacote
car.</font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3">?Anova</font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3">Você
também pode alterar o tipo de contraste na aov() ou na lm().</font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3">Observe
na CMR abaixo as diferenças.</font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm"><a name="__DdeLink__3_944850360" target="_blank"></a><a name="__DdeLink__7_944850360" target="_blank"></a><a name="__DdeLink__73_944850360" target="_blank"></a><a name="__DdeLink__85_944850360" target="_blank"></a>
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">fator1<-as.factor(c(rep("A",12),rep("B",12)))
</span></font></font></font>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div dir="LTR">
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">fator2<-as.factor(c(rep("C",4),rep("D",4),rep("E",4),<font size="2">rep("C",4),rep("D",4),rep("E",4)))</font></span></font></font></font></div>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">resposta<-c(39.03794,
30.19444, 32.57167, 34.87484, NA ,37.15130, 39.67066, 32.34696,
19.96688, 63.33362, 43.74447,47.39147, 37.37704, NA, 29.35858,
28.76528, 16.092950, 21.080503, 16.906132, 12.345620, 26.475927,
23.639545, 23.890539, NA)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">dados<-data.frame(fator1,fator2,resposta)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">require(easyanova)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm"><a name="__DdeLink__19_944850360" target="_blank"></a>
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">m1<-aov(resposta~fator1*fator2,
data=dados)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">m2<-aov(resposta~fator1*fator2,
data=dados, contrasts=list(fator1=contr.sum, fator2=contr.sum))</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm"><a name="__DdeLink__11_944850360" target="_blank"></a>
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">resultado<-ea2(dados)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">anova(m1)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">anova(m2)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">Anova(m1,
type=3)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">Anova(m2,
type=3)</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<font color="#000000"><font face="times new roman, new york, times, serif"><font size="3"><span style="background:#ffff00">resultado[1]</span></font></font></font></div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div>
<div class="ecxwestern" style="margin-bottom:0cm">
<br>
</div></span></div><div><br></div> <div style="font-family:'Courier New', courier, monaco, monospace, sans-serif;font-size:10pt"> <div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold">De:</span></b> tiago souza marçal <tiagosouzamarcal@hotmail.com><br> <b><span style="font-weight:bold">Para:</span></b> r-br@listas.c3sl.ufpr.br <br> <b><span style="font-weight:bold">Enviadas:</span></b> Segunda-feira, 26 de Novembro de 2012 11:38<br> <b><span style="font-weight:bold">Assunto:</span></b> Re: [R-br] Fatorial com parcelas perdidas<br> </font> </div> <br><div id="ecxyiv931623525">
<style><!--
.ExternalClass #ecxyiv931623525 .ecxyiv931623525hmmessage P
{padding:0px;}
.ExternalClass #ecxyiv931623525 body.ecxyiv931623525hmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div><div dir="ltr">
Obrigado pela ajuda Emmanuel, realmente as somas de quadrados foram bem diferentes das que eu obtive no CMR que enviei.<div><br></div><div>Então a função <font face="Courier New">aov()</font> não deve ser utilizada quando temos dados desbalanceados?</div><div><br></div><div>Att.</div><div><br></div><div>Tiago.<br><br><div><div id="ecxyiv931623525SkyDrivePlaceholder"></div><hr id="ecxyiv931623525stopSpelling">Date: Mon, 26 Nov 2012 04:59:32 -0800<br>From: emmanuelarnhold@yahoo.com.br<br>To: r-br@listas.c3sl.ufpr.br<br>Subject: Re: [R-br] Fatorial com parcelas perdidas<br><br><div style="color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);font-family:'Courier New', courier, monaco, monospace, sans-serif;font-size:10pt"><div><span><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px">#
install.pakages("easyanova")</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px">require(easyanova)</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px">resultado=ea2(dados)</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px">resultado</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px">names(resultado)</div><div style="color:rgb(69, 69, 69);font-family:Arial, Helvetica, sans-serif;font-size:12px"><br></div></span></div><div><br></div> <div style="font-family:'Courier New', courier, monaco, monospace, sans-serif;font-size:10pt"> <div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold">De:</span></b> tiago souza marçal <tiagosouzamarcal@hotmail.com><br> <b><span style="font-weight:bold">Para:</span></b> r-br@listas.c3sl.ufpr.br <br> <b><span style="font-weight:bold">Enviadas:</span></b> Domingo, 25 de Novembro de 2012 20:07<br> <b><span style="font-weight:bold">Assunto:</span></b> [R-br] Fatorial com parcelas perdidas<br> </font> </div> <br><div id="ecxyiv931623525ecxyiv1080577699">
<style><!--
.ExternalClass #ecxyiv931623525 .ecxyiv931623525ExternalClass #ecxyiv931623525ecxyiv1080577699 .ecxyiv931623525ecxyiv1080577699hmmessage P
{padding:0px;}
.ExternalClass #ecxyiv931623525 .ecxyiv931623525ExternalClass #ecxyiv931623525ecxyiv1080577699 body.ecxyiv931623525ecxyiv1080577699hmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div><div dir="ltr">
Prezados, <div><br></div><div>gostaria de saber se no caso de parcelas perdidas é só substituir o valor perdido par NA e usar a função <font face="Courier New">aov()</font> como no exemplo abaixo.</div><div><br></div><div>fator1<-c(rep("A",12),rep("B",12)) </div><div><br></div><div>fator2<-c(rep("C",4),rep("D",4),rep("E",4),<span style="font-size:10pt">rep("C",4),rep("D",4),rep("E",4)</span><span style="font-size:10pt">)</span></div><div><br></div><div>resposta<-c(39.03794, 30.19444, 32.57167, 34.87484, NA ,37.15130, 39.67066, 32.34696, 19.96688, 63.33362, 43.74447, </div><div><br></div><div>47.39147, 37.37704, NA, 29.35858, 28.76528, 16.092950, 21.080503, 16.906132, 12.345620, 26.475927, 23.639545, 23.890539,
NA)</div><div><br></div><div>dados<-data.frame(fator1,fator2,resposta)</div><div><br></div><div>anova<-aov(resposta~fator1*fator2)</div><div><br></div><div>summary(anova)</div><div><br></div><div><br></div><div>Existe algum pacote que realiza testes de comparação múltipla para dados desbalanciados. </div><div><br></div><div>Att.</div><div><br></div><div>Tiago.</div><div><br></div><div><br></div> </div></div>
</div><br>_______________________________________________<br>R-br mailing list<br><a rel="nofollow" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br><a rel="nofollow" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a rel="nofollow" href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br><br> </div> </div> </div><br>_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.</div></div> </div></div>
</div><br>_______________________________________________<br>R-br mailing list<br><a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br><br> </div> </div> </div><br>_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forne�a c�digo m�nimo reproduz�vel.</div></div> </div></body>
</html>