<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19258">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial><IMG style="WIDTH: 327px; HEIGHT: 359px" border=0 hspace=0
alt="" align=baseline src="cid:9C59FC2B6F8F42A79274DF788DD94501@ACER4520"
width=414 height=436></FONT></DIV>
<DIV><FONT face=Arial>Como eu faço para inserir uma elipse de confiança neste
gráfico acima de Análise discriminante, não sei como usar o
comando:</FONT></DIV>
<DIV><FONT face=Arial>
<DIV><FONT
face=Arial>plot(marajoara.norm.ldakm1,dimen=2,ylim=c(-5,5),xlim=c(20,35),<BR>cex=1,col=marajoara.norm.km1$cluster)</FONT><BR></FONT><FONT
face=Arial>library(ellipse)</FONT></DIV></DIV>
<DIV><FONT face=Arial>plot(ellipse(S, centre = , t = ), type = "l")</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Abaixo tem o script que gerou este gráfico, e estou
enviando também o arquivo de dados.</FONT></DIV>
<DIV><FONT color=#000000 face=Arial><A
href="http://www.datafilehost.com/download-1eccadf2.html">http://www.datafilehost.com/download-1eccadf2.html</A></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>marajoara=read.csv('Marajoara
Mario.csv',head=T,dec=',',sep=';')<BR>marajoara.norm=sapply(data.frame(marajoara[,2:15]),scale)<BR>#marajoara.norm=(data.frame(marajoara[,2:15]))<BR>#summary(marajoara.norm)<BR>#library(fBasics)<BR>#basicStats(marajoara.norm)<BR>marajoara.norm.h=hclust(dist(marajoara.norm),method='average')<BR>#marajoara.norm.h=hclust(dist(marajoara.norm)^2,method='ward')<BR>plot(marajoara.norm.h,main='Marajoara
original-Ward Linkage\n Square Euclidian Distance\n Hclust
Dendograma')<BR>#pdf('figuras/Marajoara-original-dendograma-hclust-average.pdf')<BR>library(cluster)<BR>marajoara.norm.d=diana(dist(marajoara.norm))<BR>plot(marajoara.norm.d,main='Marajoara
original-Divisive
Dendograma')<BR>#pdf('figuras/Marajoara-original-dendograma-divisive.pdf')<BR>#Componentes
Principais<BR>initial=tapply(marajoara.norm,list(rep(cutree(marajoara.norm.h,3),<BR>ncol(marajoara.norm)),col(marajoara.norm)),mean)<BR>marajoara.norm.km1=kmeans(marajoara.norm,initial)<BR>marajoara.norm.pca=princomp(marajoara.norm)<BR>marajoara.norm.px=predict(marajoara.norm.pca)<BR>library(MASS)<BR>eqscplot(marajoara.norm.px[,1:2],type='n',xlab='component
1',ylab='component
2')<BR>text(marajoara.norm.px[,1:2],labels=as.character(marajoara.norm.km1$cluster),<BR>col=as.numeric(marajoara.norm.km1$cluster))<BR>title('PCA
Marajoara original - clusters kmeans\n centros iniciais corte dendograma hclust
3')<BR>#identify(marajoara.norm.px,n=5)<BR>#pdf('figuras/PCA-Marajoara-original-centros-kmeans\n
centros inicias de corte dendograma hclust 3')</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2
face=Arial>initial=tapply(marajoara.norm,list(rep(cutree(marajoara.norm.d,3),<BR>ncol(marajoara.norm)),col(marajoara.norm)),mean)<BR>marajoara.norm.km2=kmeans(marajoara.norm,initial)<BR>marajoara.norm.pca=princomp(marajoara.norm)<BR>marajoara.norm.px=predict(marajoara.norm.pca)<BR>eqscplot(marajoara.norm.px[,1:2],type='n',xlab='component
1',ylab='component
2')<BR>text(marajoara.norm.px[,1:2],labels=as.character(marajoara.norm.km2$cluster),<BR>col=as.numeric(marajoara.norm.km2$cluster))<BR>title('PCA
Marajoara original - clusters kmeans\n centros iniciais corte dendograma diana
3')<BR>#identify(marajoara.norm.px,n=5)<BR>#pdf('figuras/PCA-Marajoara-original-centros-kmeans\n
centros inicias de corte
dendodiana-3.pdf')<BR>marajoara.norm.km=kmeans(marajoara.norm,3)<BR>marajoara.norm.pca=princomp(marajoara.norm)<BR>marajoara.norm.px=predict(marajoara.norm.pca)<BR>eqscplot(marajoara.norm.px[,1:2],type='n',xlab='component
1',ylab='component
2')<BR>text(marajoara.norm.px[,1:2],labels=as.character(marajoara.norm.km$cluster),<BR>col=marajoara.norm.km$cluster)<BR>title('PCA
Marajoara original - clusters kmeans 3
centros')<BR>#identify(marajoara.norm.px,n=5)<BR>#pdf('figuras/PCA-Marajoara-original-clusters-kmeans-3-centros.pdf')</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>#Análise Discriminante
Linear<BR>marajoara.norm.ldakm1=lda(marajoara.norm,as.character(marajoara.norm.km1$cluster))<BR>plot(marajoara.norm.ldakm1,dimen=2,cex=1,col=marajoara.norm.km1$cluster)<BR>title('LDA
Marajoara-Grupo do K-Means - corte dendograma hclust em
3')<BR>#pdf('figuras/LDA-Marajoara-grupos-kmeans-dendohclust-3.pdf')<BR>#fazendo
um zoom no gráfico corta um
ponto<BR>plot(marajoara.norm.ldakm1,dimen=2,ylim=c(-5,5),xlim=c(20,35),<BR>cex=1,col=marajoara.norm.km1$cluster)<BR>title('LDA
Marajoara-parte do gráfico para visualização\n Grupos do K-Means-corte
dendograma hclust em
3')<BR>#identify(marajoara.norm.km1$cluster,n=5)<BR>#pdf('figuras/LDA-Marajoara-grupos-kmeans-dendodiana-3.pdf')<BR>library(ellipse)</FONT></DIV>
<DIV><FONT size=2 face=Arial>plot(ellipse(S, centre = , t = ), type =
"l")</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>