Bandas de confiança em plot de dispersão

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))

http://lmgtfy.com/?q=bandas+de+confianca+%22r-br%22 On 9 May 2012 16:06, Marcelo Cardoso mello <marcelo_cm32@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@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.

Para isto voce precisa definir um modelo seus comandos e gráficos são medidas descritivas bandas de confinaça vao depender do modelo que voce deseja especificar (lm, glm, nls, gam, splines etc etc etc etc) On Wed, 9 May 2012, Marcelo Cardoso mello 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))
participantes (3)
-
Benilton Carvalho
-
Marcelo Cardoso mello
-
Paulo Justiniano