Diferenças
Aqui você vê as diferenças entre duas revisões dessa página.
| Próxima revisão | Revisão anterior | ||
| pessoais:walmes:cursoragrarias2012 [2012/08/07 19:54] – criada walmes | pessoais:walmes:cursoragrarias2012 [2012/10/28 20:28] (atual) – walmes | ||
|---|---|---|---|
| Linha 3: | Linha 3: | ||
| === Descrição === | === Descrição === | ||
| - | Disciplina: Tópicos Especiais - Modelagem e análise de dados experimentais com o programa computacional R \\ | + | Disciplina: Tópicos Especiais |
| + | Professor Coordenador: | ||
| Professor Coordenador: | Professor Coordenador: | ||
| Professor Colaborador: | Professor Colaborador: | ||
| - | Nº de Créditos: | + | Nº de Créditos: |
| - | Carga horária: | + | Carga horária: |
| - | Período Letivo: | + | Período Letivo: |
| + | === Referências bibliográficas === | ||
| + | < | ||
| + | |||
| + | @TechReport{ribeiro_jr-leg, | ||
| + | url = {http:// | ||
| + | year = {2009}, | ||
| + | author = {Paulo Justiniano {Ribeiro Júnior}}, | ||
| + | title = {Introdução ao Ambiente Estatístico R} | ||
| + | } | ||
| + | |||
| + | @TechReport{faraway-cran, | ||
| + | url = {http:// | ||
| + | year = {2002}, | ||
| + | author = {Julian J. Faraway}, | ||
| + | title = {Practical Regression and Anova using {R}} | ||
| + | } | ||
| + | |||
| + | @book{faraway_linear_2005, | ||
| + | title = {Linear models with R}, | ||
| + | url = {http:// | ||
| + | isbn = {9781584884255}, | ||
| + | publisher = {Chapman \& Hall/ | ||
| + | author = {Julian James Faraway}, | ||
| + | year = {2005}, | ||
| + | pages = {244} | ||
| + | } | ||
| + | |||
| + | @book{venables_modern_2002, | ||
| + | title = {Modern applied statistics with S}, | ||
| + | url = {http:// | ||
| + | isbn = {9780387954578}, | ||
| + | publisher = {Birkhäuser}, | ||
| + | author = {William N. Venables and Brian D. Ripley}, | ||
| + | year = {2002}, | ||
| + | pages = {518} | ||
| + | } | ||
| + | |||
| + | |||
| + | @book{everitt_handbook_2009, | ||
| + | edition = {2}, | ||
| + | title = {A Handbook of Statistical Analyses Using R, Second Edition}, | ||
| + | %url = {http:// | ||
| + | url = {http:// | ||
| + | isbn = {1420079336}, | ||
| + | publisher = {Chapman \& Hall}, | ||
| + | author = {Brian S. Everitt and Torsten Hothorn}, | ||
| + | month = jul, | ||
| + | year = {2009} | ||
| + | } | ||
| + | |||
| + | @book{dalgaard_introductory_2008, | ||
| + | edition = {2nd}, | ||
| + | title = {Introductory Statistics with R}, | ||
| + | url = {http:// | ||
| + | isbn = {0387790535}, | ||
| + | publisher = {Springer}, | ||
| + | author = {Peter Dalgaard}, | ||
| + | month = aug, | ||
| + | year = {2008} | ||
| + | } | ||
| + | |||
| + | @book{dobson_introduction_2008, | ||
| + | edition = {3}, | ||
| + | title = {An Introduction to Generalized Linear Models, Third Edition}, | ||
| + | url = {http:// | ||
| + | isbn = {1584889500}, | ||
| + | publisher = {Chapman and {Hall/ | ||
| + | author = {Annette J. Dobson and Adrian Barnett}, | ||
| + | month = may, | ||
| + | year = {2008} | ||
| + | } | ||
| + | |||
| + | @book{ritz_nonlinear_2008, | ||
| + | edition = {1}, | ||
| + | title = {Nonlinear Regression with R}, | ||
| + | url = {http:// | ||
| + | isbn = {0387096159}, | ||
| + | publisher = {Springer}, | ||
| + | author = {Christian Ritz and Jens Carl Streibig}, | ||
| + | month = nov, | ||
| + | year = {2008} | ||
| + | } | ||
| + | |||
| + | @book{sarkar_lattice: | ||
| + | edition = {1}, | ||
| + | title = {Lattice: Multivariate Data Visualization with R}, | ||
| + | url = {http:// | ||
| + | isbn = {0387759689}, | ||
| + | shorttitle = {Lattice}, | ||
| + | publisher = {Springer}, | ||
| + | author = {Deepayan Sarkar}, | ||
| + | month = mar, | ||
| + | year = {2008} | ||
| + | } | ||
| + | |||
| + | @book{murrell_r_2005, | ||
| + | edition = {1}, | ||
| + | title = {R Graphics}, | ||
| + | url = {http:// | ||
| + | isbn = {{158488486X}}, | ||
| + | publisher = {Chapman and {Hall/ | ||
| + | author = {Paul Murrell}, | ||
| + | month = jul, | ||
| + | year = {2005} | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | === Material usado no curso === | ||
| + | |||
| + | Diretório com arquivos de dados e scripts do curso: {{http:// | ||
| + | |||
| + | === Cronograma de atividades do Curso === | ||
| + | |||
| + | * Manhã (M): 09: | ||
| + | * Tarde (T): 13: | ||
| + | |||
| + | ^ Data ^ Atividade | ||
| + | | aula 01, 10/08 (M) sex | Informações gerais sobre à disciplina. Introdução ao R, download, instação, primeiros passos. | [[http:// | ||
| + | | aula 02, 10/09 (M) seg | Importação de dados no formato texto. | [[http:// | ||
| + | | aula 03, 13/09 (M) qui | Importação e visualização de dados. | [[http:// | ||
| + | | aula 04, 14/09 (M) sex | Aplicando filtros, selecionando subconjuntos e gráficos da lattice. | [[http:// | ||
| + | | aula 05, 22/10 (M) seg | Simulando dados, regressão polinomial e não linear. | [[http:// | ||
| + | | aula 06, 25/10 (M) qui | Análise de experimento com alternativas para satisfazer os pressupostos. | [[http:// | ||
| + | | aula 07, 26/10 (M) sex | Análise de experimento, | ||
| + | | aula 08, 01/11 (M) qui | Programado: aula teórica análise contagem e proporção. | | | ||
| + | | aula 09, 01/11 (T) qui | Programado: exposição dos casos experimentais. | | | ||
| + | | aula 10, 28/11 (M) qua | Programado: (08: | ||
| + | |||
| + | === Vídeos === | ||
| + | |||
| + | * {{http:// | ||
| + | * {{http:// | ||
| + | * {{http:// | ||
| + | * {{http:// | ||
| + | |||
| + | === Código === | ||
| + | |||
| + | < | ||
| + | # | ||
| + | |||
| + | vol <- read.table(" | ||
| + | header=TRUE, | ||
| + | str(vol) | ||
| + | vol$dos <- factor(vol$dose) | ||
| + | |||
| + | xyplot(volu~dose|gen, | ||
| + | |||
| + | m0 <- aov(volu~gen+dos+gen: | ||
| + | anova(m0) | ||
| + | |||
| + | par(mfrow=c(2, | ||
| + | |||
| + | boxcox(m0) | ||
| + | |||
| + | m1 <- aov((volu^(1/ | ||
| + | par(mfrow=c(2, | ||
| + | anova(m1) | ||
| + | |||
| + | with(vol, fat2.crd(gen, | ||
| + | |||
| + | # | ||
| + | |||
| + | plot(residuals(m0)~vol$dos) | ||
| + | plot(residuals(m0)~vol$dose) | ||
| + | |||
| + | qqmath(~residuals(m0)|vol$dose) | ||
| + | |||
| + | pesos <- tapply(residuals(m0), | ||
| + | vol$pesos <- rep(pesos, each=27) | ||
| + | |||
| + | m2 <- aov(volu~gen+dos+gen: | ||
| + | par(mfrow=c(2, | ||
| + | anova(m2) | ||
| + | |||
| + | require(doBy) | ||
| + | |||
| + | popMeans(m2, | ||
| + | popMeans(m2, | ||
| + | popMeans(m2, | ||
| + | |||
| + | require(agricolae) | ||
| + | glr <- df.residual(m2) | ||
| + | s2 <- deviance(m2)/ | ||
| + | |||
| + | with(subset(vol, | ||
| + | | ||
| + | |||
| + | with(subset(vol, | ||
| + | | ||
| + | |||
| + | with(subset(vol, | ||
| + | | ||
| + | |||
| + | # | ||
| + | # dose em cada genótipo | ||
| + | |||
| + | X <- popMatrix(m2, | ||
| + | contr <- expand.grid(gen=levels(vol$gen), | ||
| + | which(contr$gen==" | ||
| + | |||
| + | contr.x <- rbind(" | ||
| + | " | ||
| + | " | ||
| + | contr.x%*%coef(m2) # estimativas dos contrastes | ||
| + | contr.x%*%vcov(m2)%*%t(contr.x) | ||
| + | |||
| + | summary(glht(m2, | ||
| + | |||
| + | # | ||
| + | # fizemos isso para um único nível de gen, o código abaixo faz para todos | ||
| + | |||
| + | lM <- lapply(levels(vol$gen), | ||
| + | | ||
| + | | ||
| + | }) | ||
| + | lM | ||
| + | |||
| + | com <- combn(3, 2) | ||
| + | |||
| + | compr <- lapply(lM, | ||
| + | function(i){ | ||
| + | m <- t(apply(com, | ||
| + | }) | ||
| + | names(compr) <- levels(vol$gen) | ||
| + | compr | ||
| + | |||
| + | lapply(compr, | ||
| + | |||
| + | # | ||
| + | # colocando os resultados em um gráfico com IC | ||
| + | |||
| + | IC <- lapply(compr, | ||
| + | IC <- lapply(IC, " | ||
| + | IC <- do.call(rbind, | ||
| + | nm <- apply(com, 2, function(i) paste(levels(vol$dos)[i[1]], | ||
| + | |||
| + | IC <- cbind(expand.grid(compr=nm, | ||
| + | str(IC) | ||
| + | |||
| + | require(latticeExtra) | ||
| + | |||
| + | segplot(compr~lwr+upr|gen, | ||
| + | |||
| + | segplot(compr~lwr+upr|gen, | ||
| + | strip.left=TRUE, | ||
| + | draw.bands=FALSE, | ||
| + | segments.fun=panel.arrows, | ||
| + | angle=90, length=1, unit=" | ||
| + | |||
| + | segplot(compr~lwr+upr|gen, | ||
| + | strip.left=TRUE, | ||
| + | draw.bands=FALSE, | ||
| + | segments.fun=panel.arrows, | ||
| + | angle=90, length=1, unit=" | ||
| + | panel=function(...){ | ||
| + | panel.segplot(...) | ||
| + | panel.abline(v=0, | ||
| + | }) | ||
| + | |||
| + | # | ||
| + | |||
| + | </ | ||