<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:16px"><div id="yiv6331659199"><div id="yui_3_16_0_1_1435199219913_2961"><div style="color:#000;background-color:#fff;font-family:bookman old style, new york, times, serif;font-size:16px;" id="yui_3_16_0_1_1435199219913_2960"><div id="yiv6331659199yui_3_16_0_1_1435195707364_3158"><span id="yiv6331659199yui_3_16_0_1_1435195707364_3168">Pois é Bruno eu já havia pesquisado aqui e achei este pacote também, mas comparando com outros não batem matriz que procuro! </span></div><div id="yiv6331659199yui_3_16_0_1_1435195707364_3158"><span><br clear="none"></span></div><div id="yiv6331659199yui_3_16_0_1_1435195707364_3158">x1 <- c(131.37, 132.37, 134.47, 135.50, 136.17)<br clear="none"></div><div class="yiv6331659199" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">x2 <- c(133.60, 132.70, 133.80, 132.30, 130.33)</div><div class="yiv6331659199" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">x3 <- c(99.17, 99.07, 96.03, 94.53, 93.50)</div><div class="yiv6331659199" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">x4 <- c(50.53, 50.23, 50.57, 51.97, 51.37)</div><div id="yiv6331659199yui_3_16_0_1_1435195707364_3158"></div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">x <- cbind(x1, x2, x3, x4)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">require(StatMatch)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">D2=mahalanobis.dist(x)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">D2</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">d2=as.matrix(D2) </div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">d2</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_3158" style="">d=as.dist(d2) </div><pre class="yiv6331659199" id="yiv6331659199rstudio_console_output" style="font-family:'Ubuntu Mono';outline:none;border:none;margin-top:0px;margin-bottom:0px;line-height:16px;color:rgb(222, 222, 222);font-size:10.4pt !important;background-color:rgb(0, 0, 0);"><span class="yiv6331659199" style="color:rgb(195, 151, 216);">d
</span> 1 2 3 4
2 2.828427
3 2.828427 2.828427
4 2.828427 2.828427 2.828427
5 2.828427 2.828427 2.828427 2.828427</pre><div></div><div id="yiv6331659199yui_3_16_0_1_1435195707364_4765"><br clear="none" id="yiv6331659199yui_3_16_0_1_1435195707364_6473"></div><div id="yiv6331659199yui_3_16_0_1_1435195707364_4196"><div id="yiv6331659199yui_3_16_0_1_1435195707364_4195"><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">require(biotools) </div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">x1 <- c(131.37, 132.37, 134.47, 135.50, 136.17)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">x2 <- c(133.60, 132.70, 133.80, 132.30, 130.33)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">x3 <- c(99.17, 99.07, 96.03, 94.53, 93.50)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">x4 <- c(50.53, 50.23, 50.57, 51.97, 51.37)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">x <- cbind(x1, x2, x3, x4)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">Cov <- matrix(c(21.112,0.038,0.078,2.01, 0.038,23.486,5.2,2.844,0.078,5.2,24.18,1.134, 2.01,2.844,1.134,10.154), 4, 4) # Não entendi como foi calculada tal matriz Cov tentei var(x) e não bateu com Cov! </div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style="">D2=D2.dist(x, Cov)</div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><pre class="yiv6331659199" id="yiv6331659199rstudio_console_output" style="font-family:'Ubuntu Mono';outline:none;border:none;margin-top:0px;margin-bottom:0px;line-height:16px;color:rgb(222, 222, 222);font-size:10.4pt !important;background-color:rgb(0, 0, 0);"><span class="yiv6331659199" id="yiv6331659199yui_3_16_0_1_1435195707364_6487" style="color:rgb(195, 151, 216);">D2
</span> 1 2 3 4
2 0.09103867
3 0.90451337 0.73086040
4 1.88407643 1.59779871 0.44281866
5 2.69996452 2.17905736 0.91121818 0.21984612</pre></div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><br clear="none"></div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><br clear="none"></div></div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><br clear="none"></div><div class="yiv6331659199" dir="ltr" id="yiv6331659199yui_3_16_0_1_1435195707364_4195" style=""><br clear="none"></div>
<br clear="none">André Oliveira Souza. <br clear="none">
<br clear="none">Graduação em Matemática, mestrado em estatística aplicada.Instituto Federal de Educação, Ciência e Tecnologia do Espirito Santo. IFES<br clear="none">
</div><br clear="none"><br clear="none"><div id="yui_3_16_0_1_1435199219913_5245">
<br clear="none"></div></div> <br clear="none"><div class="yiv6331659199qtdSeparateBR" id="yui_3_16_0_1_1435199219913_5246"><br clear="none"><br clear="none"></div></div></div></div><div class=".yiv6331659199yahoo_quoted"> <div style="font-family:bookman old style, new york, times, serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"> <font size="2" face="Arial"> Em Quarta-feira, 24 de Junho de 2015 21:07, bruno vidigal <caetano.vidigal@gmail.com> escreveu:<br clear="none"> </font> </div> <br clear="none"><br clear="none"> <div class="yiv6331659199y_msg_container"><div class="qtdSeparateBR"><br><br></div><div class="yiv6331659199yqt5099856693" id="yiv6331659199yqt89144"><div id="yiv6331659199"><div><div dir="ltr">Andre, tenta assim<div><br clear="none"></div><div><div>install.packages("StatMatch")</div><div>library(StatMatch)</div></div><div><br clear="none"></div><div>mahalanobis.dist(iris[1:6,1:4])<br clear="none"></div></div><div class="yiv6331659199gmail_extra"><br clear="none"><div class="yiv6331659199gmail_quote">Em 24 de junho de 2015 18:54, David Feitosa <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:contato@davidfeitosa.com" target="_blank" href="mailto:contato@davidfeitosa.com">contato@davidfeitosa.com</a>></span> escreveu:<br clear="none"><blockquote class="yiv6331659199gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv6331659199yqt2628064165" id="yiv6331659199yqt71331"><div dir="ltr"><div class="yiv6331659199gmail_extra">Desconheço essa "<span style="font-size:12.8000001907349px;">mahalanobis</span>",</div><div class="yiv6331659199gmail_extra">mas eu precisei criar um dendograma uma vez para plotar um gráfico e</div><div class="yiv6331659199gmail_extra">criei baseado num list e na documentação.</div><div class="yiv6331659199gmail_extra"><br clear="none"></div><div class="yiv6331659199gmail_extra"><br clear="none"></div><div class="yiv6331659199gmail_extra"><div class="yiv6331659199gmail_quote">Em 24 de junho de 2015 16:28, Cleber Borges <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:klebyn@yahoo.com.br" target="_blank" href="mailto:klebyn@yahoo.com.br">klebyn@yahoo.com.br</a>></span> escreveu:<br clear="none"><blockquote class="yiv6331659199gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">mahalanobis</blockquote></div><br clear="none"><br clear="none"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div><div><br clear="none"></div><div>Atenciosamente,</div><div><br clear="none"></div>David F.</div></div></div></div></div></div>
</div></div></div>
<br clear="none">_______________________________________________<br clear="none">
R-br mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br clear="none">
Leia o guia de postagem (<a rel="nofollow" shape="rect" target="_blank" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br clear="none"></blockquote></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv6331659199gmail_signature">Bruno C. Vidigal</div>
</div></div></div></div><br clear="none"><div class="yiv6331659199yqt2628064165" id="yiv6331659199yqt37676">_______________________________________________<br clear="none">R-br mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:R-br@listas.c3sl.ufpr.br" target="_blank" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br clear="none">Leia o guia de postagem (<a rel="nofollow" shape="rect" target="_blank" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.</div><br clear="none"><br clear="none"></div> </div> </div> </div></div></body></html>