<div dir="ltr"><div>Edson, boa noite!</div><div><br></div><div>Código adaptado para 25 observações por dia (5 grupos com 5 observações).</div><div><br></div><div><font face="courier new, monospace">### <code r></font></div>
<div><font face="courier new, monospace">### restaurando dados de exemplo!</font></div><div><font face="courier new, monospace">dat <- data.frame(tempo=c(30.48,32.17,32.32,32.68,33.42,34.1,34.33,35.12,35.95,36.18,36.73,36.75,36.78,37.05,37.18,38.1,38.4,40.05,40.62,40.87,41.33,41.38,41.5,41.63,43.38,43.65,43.85,43.88,44.37,45.67,45.73,46.17,46.5,46.75,47.17,47.55,47.63,47.65,49.62,49.85,49.98,50.65,51.15,51.67,51.7,51.97,53.12,53.23,53.77,54.08,54.18,54.32,54.65,54.98,55.55,56.47,58.13,58.65,58.93,59.2,59.67,59.92,60.08,60.28,60.63,60.93,61.78,62.58,63.42,63.93,64.13,65.12,66.02,66.55,67.23,67.85,71.32,73.03,73.68,75.1,75.52,79.75,79.93,80.88,81.23,91.85,103.73,109.27,115.65,123.63,131.88,173.28,30.68,31.68,32.1,33.12,33.25,33.48,34.5,35.15,35.52,35.87,36.52,36.63,36.75,39.32,40.37,41.4,41.57,41.57,41.78,43.85,44.05,44.97,45.47,45.93,47.03,47.1,47.35,47.63,48.3,48.38,48.62,48.85,48.88,49,49.87,50.65,50.73,51.07,51.42,51.8,52.08,52.72,52.83,53.23,53.32,53.57,53.68,54,54.12,54.23,54.28,54.5,55.13,55.32,55.65,55.85,56.02,56.15,56.43,56.45,56.58,56.58,57.22,57.77,57.78,58.17,58.43,58.57,58.58,59.38,59.8,59.87,60.18,60.67,61.35,61.42,61.6,62.07,62.18,62.42,63.07,63.93,64.57,65.2,65.33,65.78,65.8,66.38,66.55,66.78,67.07,67.43,67.57,68.28,68.3,68.32,68.43,68.68,68.82,69,69.55,70.22,70.58,71.42,71.6,72.13,72.17,72.55,72.57,72.67,72.7,72.8,72.8,73.38,73.38,73.67,74.28,75.05,75.4,75.53,75.75,76.6,77.75,78.22,78.42,78.47,78.63,79.27,79.58,79.78,80.18,81.53,81.78,82.17,84.87,85.07,85.2,85.77,86.37,87.25,88.78,88.93,88.98,89.68,91,92.62,93.5,93.83,95.12,97.1,97.23,97.77,98.83,101.47,107.87,108.17,109.07,112.25,112.58,113.53,113.75,119.48,121.32,132.88,139.73,31.95,32.4,35.2,35.35,36.62,36.88,37.62,38.65,39.68,40.05,41.25,41.28,42,42.03,42.23,42.63,42.67,43.02,43.32,43.32,44.23,44.27,44.7,45.08,46.42,48.17,48.25,49.55,50.13,50.85,50.97,51.85,52.28,52.85,52.9,53.13,54.23,54.98,55.45,56.28,56.53,57.33,57.75), dia_doa=rep(c(1:3), c(92,165,43)))</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">table(dat$dia_doa)</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">### 25 amostras por dia (5x5)</font></div>
<div><font face="courier new, monospace">{set.seed(765); rPos <- unlist(sapply(unique(dat$dia_doa), function(x) sample(which(dat$dia_doa==x),25)))} ### reposicionamento aleatório dentro dos dias</font></div><div><font face="courier new, monospace">rDat <- dat[rPos,]; head(rDat)</font></div>
<div><font face="courier new, monospace">rDat$dia_doa ### notar que dias continuam sequenciais!</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">dN  <- as.vector(table(rDat$dia_doa)) ### dados em cada dia!</font></div>
<div><font face="courier new, monospace">grp <- NULL; for (n in dN) grp <- c(grp, rep(1:ceiling(n/5), each=5, len=n)) ### grupos dentro de dias</font></div><div><font face="courier new, monospace"><br></font></div><div>
<font face="courier new, monospace">DAT    <- cbind(rDat, grp); row.names(DAT) <- NULL; head(DAT)</font></div><div><font face="courier new, monospace">DAT$id <- DAT$dia_doa*1000+DAT$grp ### cria um id/label único para grupos!</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">table(DAT$dia_doa)</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">###</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">require(qcc)</font></div><div><font face="courier new, monospace">qcc(qcc.groups(DAT$tempo, DAT$id)) ### veja no console: nsigmas=3 por padrão</font></div>
<div><font face="courier new, monospace">qcc(qcc.groups(DAT$tempo, DAT$id), nsigmas=2)</font></div><div><font face="courier new, monospace">### </code></font></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">
Éder Comunello <<a href="mailto:comunello.eder@gmail.com" target="_blank">c</a><a href="mailto:omunello.eder@gmail.com" target="_blank">omunello.eder@gmail.com</a>> <br>Dourados, MS - [22 16.5'S, 54 49'W]<br>
</div></div>
<br></div></div>