[R-br] Bandas de confiança em plot de dispersão

Benilton Carvalho beniltoncarvalho em gmail.com
Quarta Maio 9 12:12:05 BRT 2012


http://lmgtfy.com/?q=bandas+de+confianca+%22r-br%22

On 9 May 2012 16:06, Marcelo Cardoso mello <marcelo_cm32 em yahoo.com.br> wrote:
> Pessoal, gostaria de adicionar bandas de confiança na CMR que segue.
> Agradeço qualquer dica.
>
> x<-structure(list(week = c(9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L,
> 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L,
> 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L,
> 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L,
> 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L,
> 9L, 10L, 11L, 12L, 9L, 10L, 11L, 12L), kid = c(1L, 1L, 1L, 1L,
> 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L,
> 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L,
> 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 13L,
> 13L, 13L, 13L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L, 16L, 16L,
> 16L, 16L, 17L, 17L, 17L, 17L), treatment = c(1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
> 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
> 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L
> ), gain = c(1.2, 1, 1.1, 1.3, 1.2, 1.1, 1.4, 1.5, 1.3, 1.4, 1.4,
> 1.6, 1.1, 1.1, 1.2, 1.3, 1.2, 1.3, 1.2, 1.3, 1.1, 1.1, 1.1, 1.2,
> 1.1, 1.2, 1.3, 1.5, 1.3, 1.3, 1.3, 1.4, 1.2, 1.5, 1.9, 2.1, 1.3,
> 1.2, 1.4, 1.7, 1.5, 1.7, 1.6, 1.7, 1.4, 1.5, 1.7, 1.8, 1.2, 1.2,
> 1.4, 1.6, 1, 1.1, 1.4, 1.5, 1.4, 1.8, 2.1, 2.1, 1.1, 1.3, 1.4,
> 1.8, 1.2, 1.5, 1.7, 1.9)), .Names = c("week", "kid", "treatment",
> "gain"), class = "data.frame", row.names = c(NA, -68L))
> y<-aggregate(.~week+treatment, x, FUN=mean)
> s1<-subset(y, treatment==1)
> s2<-subset(y, treatment==2)
>
> plot(gain~week, data=s1, col=1, type="o", ylim=c(1,2), lty=1)
> points(gain~week, data=s2, col=2, type="o", lty=2)
> legend(9.5,1.7, c("t1","t2"), col=c(1,2), lty=c(1,2))
>
> _______________________________________________
> R-br mailing list
> R-br em listas.c3sl.ufpr.br
> https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
> Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código
> mínimo reproduzível.


Mais detalhes sobre a lista de discussão R-br