Omg. Vida difícil.<div>Não consigo instalar o pacote 'contrast"</div><div>Como foi comentado em outro e-mail, ele necessita do pacote Design, que foi descontinuado.</div><div>Ai eu fui la e baixei a ultima versão no link do R que o Benilton comentou no outro e-mail</div>
<div>Ai quando vou instalar a partir do zip da o seguinte erro:</div><div><br></div><div>##########################################################################</div><div><div>> utils:::menuInstallLocal()</div><div>
Erro em read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : </div><div> não é possível abrir a conexão</div><div>Além disso: Mensagens de aviso perdidas:</div><div>1: In unzip(zipname, exdir = dest) :</div>
<div> erro 1 na extração a partir de arquivo zip</div><div>2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :</div><div> não foi possível abrir o arquivo comprimido 'Design_2.3-0.tar.gz/DESCRIPTION', motivo provável 'No such file or directory'</div>
<div>#######################################################################################################</div></div><div><br></div><div>Mas esse arquivo DESCRIPTION ta la dentro do arquivo compactado do pacote, eu fui la olhar, não sei o que acontece.</div>
<div><br></div><div>Dei um <a href="http://sys.info">sys.info</a>() pra ver se ajudo.</div><div><br></div><div>###</div><div><div>> Sys.info()</div><div> sysname release </div><div>
"Windows" "7" </div><div> version nodename </div><div>"build 7601, Service Pack 1" "AUGUSTO_NOTE" </div>
<div> machine login </div><div> "x86" "Augusto Notebook" </div><div> user effective_user </div>
<div> "Augusto Notebook" "Augusto Notebook" </div></div><div><div>###</div><div><br></div><div>To vendo que ta chegando a hora de mudar pro linux...<br><br><div class="gmail_quote">Em 25 de novembro de 2011 10:56, Walmes Zeviani <span dir="ltr"><<a href="mailto:walmeszeviani@gmail.com">walmeszeviani@gmail.com</a>></span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font face="trebuchet ms,sans-serif">Augusto,<br><br>Você deve crias os contrastes de Tukey. Não há função para isso. Você deve criar exatamente da maneira como você quer comparar, ou seja, pelas suas explicações, comparar níveis de B (pairwise) fixando níveis de A. Combinando as funções que o R possui (combn, apply, contrast, multcomp) a tarefa fica simples.<br>
<br><span style="font-family:courier new,monospace">da <- expand.grid(A=gl(3,1), B=gl(4,4))</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">da$y <- rnorm(nrow(da))</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">require(nlme)</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">m0 <- gls(y~A*B, da)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">anova(m0)</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"># comparar níveis (pairwise) de B fixando nível de A (contrastes de Tukey)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">choose(nlevels(da$B), 2) # número de comparações</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">cpr <- combn(nlevels(da$B), 2); cpr # as comparações</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Blev <- levels(da$B)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Alev <- levels(da$A)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">cpr.names <- paste("B", cpr[1,], "-", "B", cpr[2,], sep="")</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">require(contrast)</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">cpr.list <- lapply(cpr.list, t)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">cpr.list # matriz de contrastes de Tukey entre B fixando A</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">c0 <- apply(cpr, 2,</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> function(i){</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> c1 <- contrast(m0, list(A=Alev[1], B=Blev[i[1]]),</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> list(A=Alev[1], B=Blev[i[2]]))</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> c1$X</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> })</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">colnames(c0) <- paste("A", Alev[1], "/", cpr.names, sep="")</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">c0</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">require(multcomp)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">glht(m0, linfct=t(c0)) # repetir para os demais níveis de A</span><br style="font-family:courier new,monospace"><br>À disposição.<span class="HOEnZb"><font color="#888888"><br>
Walmes.<br><br clear="all"></font></span></font><div class="HOEnZb"><div class="h5"><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: <a href="tel:%28%2B55%29%2041%203361%203573" value="+554133613573" target="_blank">(+55) 41 3361 3573</a></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></span><br style="font-family:trebuchet ms,sans-serif">
<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><br>
</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></blockquote></div><br><br clear="all"><div><br></div>-- <br>
<div>Grato<br>Augusto C. A. Ribas</div>
<div> </div>
<div>Site Pessoal: <a href="http://augustoribas.heliohost.org" target="_blank">http://augustoribas.heliohost.org</a></div>
<div>Lattes: <a href="http://lattes.cnpq.br/7355685961127056" target="_blank">http://lattes.cnpq.br/7355685961127056</a><br></div><br>
</div></div>