Dados com muitos zeros (sugestão de como analisar)

Caros amigos Tenho os seguintes dados abaixo. Desejo avaliar a resposta NEFA em função dos fatores TRATAMENTO E TEMPO. Acontece que a variável NEFA possui muitos zeros, os quais são também respostas. Gostaria de sugestões de como posso analisar tal tipo de dado. att dados<-structure(list(ANIMAL = structure(c(13L, 13L, 13L, 13L, 13L, 13L, 13L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 17L, 17L, 17L, 17L, 17L, 17L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("20", "18", "3", "2", "5", "6", "13", "9", "14", "4", "17", "7", "1", "12", "11", "8", "19", "15", "16", "10"), class = c("ordered", "factor")), TRATAMENTO = structure(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, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 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08313, 0, 0, 0, 0.00192, 0, 0, 0.2064, 0, 0, 0, 0.02007, 0, 0, 0.16244, 0, 0, 0, 0, 0, 0, 0.16626, 0, 0, 0, 0.08982, 0, 0, 0.23602, 0.01242, 0, 0, 0, 0, 0, 0.5179, 0, 0, 0, 0, 0, 0, 0.18728, 0, 0, 0, 0.0086, 0, 0, 0.71283, 0, 0, 0, 0.00764, 0, 0, 0.30386, 0, 0, 0, 0.0086, 0, 0, 0.2943, 0, 0, 0, 0.01911, 0, 0, 0.17009, 0.0258, 0, 0, 0, 0, 0, 0.20066, 0, 0, 0, 0, 0, 0, 0.5781, 0, 0, 0, 0.01338, 0, 0, 0.5867, 0, 0, 0, 0.01624, 0, 0, 0.23315, 0, 0, 0, 0, 0, 0, 0.06211, 0, 0, 0, 0, 0, 0, 0.54083, 0, 0, 0, 0.01816, 0, 0.05638, 0.05829, 0, 0, 0.02484, 0)), .Names = c("ANIMAL", "TRATAMENTO", "TEMPO", "NEFA"), class = c("nffGroupedData", "nfGroupedData", "groupedData", "data.frame"), row.names = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 101L, 102L, 103L, 104L, 105L, 106L, 107L, 108L, 109L, 110L, 111L, 112L, 113L, 114L, 115L, 116L, 117L, 118L, 119L, 120L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 128L, 129L, 130L, 131L, 132L, 134L, 135L, 136L, 137L, 138L, 139L), formula = NEFA ~ TEMPO | ANIMAL, FUN = function (x) max(x, na.rm = TRUE), order.groups = TRUE, na.action = structure(c(133L, 140L), .Names = c("133", "140"), class = "omit")) -- ======================================================================= Fernando Souza Zootecnista, DSc. Produção Animal celular: (+55) 82 8113-8781 e-mail:nandodesouza@gmail.com https://producaoanimalcomr.wordpress.com/ ========================================================================

Me parece que a distribuição Tweedie seria interessante para os seus dados. Um caso particular da Tweedie é a compound Poisson que é uma distribuição continua mas com massa no ponto zero, exatamente como os seus dados se apresentam. Não tenho certeza mas talvez vc tenha observações dependentes dentro de ANIMAL ou mesmo um efeito longitudinal no tempo seria interessante considerar isso também. O pacote tweedie faz inferencia por verossimilhança usando a função glm tradicional do R é só mudar a familia. O pacote cpglm é especifico para compound Poisson e permite a inclusão de efeitos aleatórios. Além disso, eu tenho funções que estimam o Tweedie iid por verossimilhança e Estimating Functions nesse link. http://www.leg.ufpr.br/doku.php/publications:papercompanions:tweedie Existe a possibilidade de incluir dependencia em modelos Tweedie especificados marginalmente.Se tiver interesse nesta possibilidade me manda um e-mail que te encaminho um paper que acabei de submeter com a metodologia de como fazer isso, usando covariance linear models. Vc parece apenas estar interessado na resposta NEFA, mas caso tenha mais que uma resposta existe tbm a possibilidade de fazer o modelo multivariado, incluindo efeito de ANIMAL e tbm TEMPO se for necessário. http://www.r-bloggers.com/a-note-on-tweedie/ http://cran.r-project.org/web/packages/tweedie/tweedie.pdf http://cran.r-project.org/web/packages/cplm/cplm.pdf Em 10 de abril de 2015 22:34, Fernando Antonio de souza < nandodesouza@gmail.com> escreveu:
Caros amigos
Tenho os seguintes dados abaixo. Desejo avaliar a resposta NEFA em função dos fatores TRATAMENTO E TEMPO. Acontece que a variável NEFA possui muitos zeros, os quais são também respostas. Gostaria de sugestões de como posso analisar tal tipo de dado.
att
dados<-structure(list(ANIMAL = structure(c(13L, 13L, 13L, 13L, 13L, 13L, 13L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 17L, 17L, 17L, 17L, 17L, 17L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("20", "18", "3", "2", "5", "6", "13", "9", "14", "4", "17", "7", "1", "12", "11", "8", "19", "15", "16", "10"), class = c("ordered", "factor")), TRATAMENTO = structure(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, 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, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("0.146", "0.154", "0.182", "0.214"), class = "factor"), TEMPO = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 1L, 2L, 3L, 4L, 5L, 6L, 1L, 2L, 3L, 4L, 5L, 6L), .Label = c("0", "6", "12", "24", "36", "60", "84" ), class = "factor"), NEFA = c(0.28762, 0, 0, 0, 0.0344, 0, 0, 0.12422, 0, 0, 0, 0.00382, 0, 0, 0.08313, 0, 0, 0, 0.00192, 0, 0, 0.2064, 0, 0, 0, 0.02007, 0, 0, 0.16244, 0, 0, 0, 0, 0, 0, 0.16626, 0, 0, 0, 0.08982, 0, 0, 0.23602, 0.01242, 0, 0, 0, 0, 0, 0.5179, 0, 0, 0, 0, 0, 0, 0.18728, 0, 0, 0, 0.0086, 0, 0, 0.71283, 0, 0, 0, 0.00764, 0, 0, 0.30386, 0, 0, 0, 0.0086, 0, 0, 0.2943, 0, 0, 0, 0.01911, 0, 0, 0.17009, 0.0258, 0, 0, 0, 0, 0, 0.20066, 0, 0, 0, 0, 0, 0, 0.5781, 0, 0, 0, 0.01338, 0, 0, 0.5867, 0, 0, 0, 0.01624, 0, 0, 0.23315, 0, 0, 0, 0, 0, 0, 0.06211, 0, 0, 0, 0, 0, 0, 0.54083, 0, 0, 0, 0.01816, 0, 0.05638, 0.05829, 0, 0, 0.02484, 0)), .Names = c("ANIMAL", "TRATAMENTO", "TEMPO", "NEFA"), class = c("nffGroupedData", "nfGroupedData", "groupedData", "data.frame"), row.names = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L, 66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 90L, 91L, 92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 101L, 102L, 103L, 104L, 105L, 106L, 107L, 108L, 109L, 110L, 111L, 112L, 113L, 114L, 115L, 116L, 117L, 118L, 119L, 120L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 128L, 129L, 130L, 131L, 132L, 134L, 135L, 136L, 137L, 138L, 139L), formula = NEFA ~ TEMPO | ANIMAL, FUN = function (x) max(x, na.rm = TRUE), order.groups = TRUE, na.action = structure(c(133L, 140L), .Names = c("133", "140"), class = "omit"))
-- ======================================================================= Fernando Souza Zootecnista, DSc. Produção Animal celular: (+55) 82 8113-8781 e-mail:nandodesouza@gmail.com https://producaoanimalcomr.wordpress.com/ ========================================================================
_______________________________________________ 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.
-- Wagner Hugo Bonat ---------------------------------------------------------------------------------------------- Department of Mathematics and Computer Science (IMADA) University of Southern Denmark (SDU) and Laboratório de Estatística e Geoinformação (LEG) Universidade Federal do Paraná (UFPR)
participantes (2)
-
Fernando Antonio de souza
-
Wagner Bonat