<font face="trebuchet ms,sans-serif">Ivan,<br><br>Ao contrario do que eu também pensava, a boxplot() não usa a quantile() para encontrar os quantis, ela usa a fivenum(). Para grandes amostras não dá diferença mas para amostras pequenas dá. Você usou 2.5 mas o boxplot() usa 1.5. Eu fiz uma função também, veja<br>
<br><span style="font-family:courier new,monospace">set.seed(12345)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">y <- rbeta(100, 1, 5)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">boxplot(y)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">abline(h=fivenum(y))</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">x <- gl(4, 25)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">bp <- boxplot(y~x)</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">bp</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">bp$out</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">bp$group</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">f <- function(x){</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> qrtl <- fivenum(x)[c(2,4)]</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> iqr <- diff(qrtl)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace"> limt <- qrtl+c(-1,1)*1.5*iqr</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> findInterval(x, limt)-1</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">}</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">f(y)</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">tapply(y, x, f)</span><br style="font-family:courier new,monospace">
<br>À disposição.<br>Walmes.<br><br clear="all"></font><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></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>