diff --git a/R/PaulinoEx8.11a.R b/R/PaulinoEx8.11a.R new file mode 100644 index 0000000000000000000000000000000000000000..ad440aa2b9f3e4749abdb9cee63196040feffd95 --- /dev/null +++ b/R/PaulinoEx8.11a.R @@ -0,0 +1,44 @@ +#' @name PaulinoEx8.11a +#' @title Comportamento Predatório da Jararaca +#' @description Estudo envolvendo o comportamento predatório em +#' cativeiro da jararaca (uma das serpentes mais venenosas do +#' Brasil). Objetivo do exercício é analisar os dados estudando o +#' efeito das características das presas na proporção teória de +#' botes predatórios. +#' @format Um \code{data.frame} com 8 observações e 4 variáveis, em que +#' +#' \describe{ +#' +#' \item{\code{pigm}}{Pigmentação da serpente (escura, albina).} +#' +#' \item{\code{peso}}{Peso relativo da serpente (menor, maior).} +#' +#' \item{\code{bote}}{Bote predatório (sim, não).} +#' +#' \item{\code{freq}}{Frequência observada.} +#' +#' } +#' @keywords contingência binomial +#' @source Paulino, C. D., Singer, J. M. (2006). Análise de Dados +#' Categorizados (1st ed.). São Paulo, SP: Edgard Blucher. +#' (Exercício 8.11 a, pág. 244). +#' @examples +#' +#' str(PaulinoEx8.11a) +#' +#' xt <- xtabs(freq ~ pigm + peso + bote, data = PaulinoEx8.11a) +#' xt +#' +#' library(lattice) +#' +#' barchart(xt, +#' horizontal = FALSE, +#' beside = FALSE, +#' stack = FALSE, +#' auto.key = list(space = "top", columns = 2, +#' cex.title = 1, rectangles = TRUE, +#' points = FALSE, title = "Bote predatório"), +#' xlab = "Pigmentação", +#' ylab = "Frequência") +#' +NULL \ No newline at end of file diff --git a/data-raw/PaulinoEx8.11a.txt b/data-raw/PaulinoEx8.11a.txt new file mode 100644 index 0000000000000000000000000000000000000000..04f811e0bc4e17a22733c4f9a878abe8631607c6 --- /dev/null +++ b/data-raw/PaulinoEx8.11a.txt @@ -0,0 +1,9 @@ +pigm peso bote freq +escura menor sim 6 +escura menor nao 3 +escura maior sim 6 +escura maior nao 4 +albina menor sim 5 +albina menor nao 7 +albina maior sim 17 +albina maior nao 4 diff --git a/data/PaulinoEx8.11a.rda b/data/PaulinoEx8.11a.rda new file mode 100644 index 0000000000000000000000000000000000000000..5d5d80c957881430d4e93aac298feb6d7262522c Binary files /dev/null and b/data/PaulinoEx8.11a.rda differ diff --git a/man/PaulinoEx8.11a.Rd b/man/PaulinoEx8.11a.Rd new file mode 100644 index 0000000000000000000000000000000000000000..e2f186778de498940d55b49f1cbb8322246c1ab9 --- /dev/null +++ b/man/PaulinoEx8.11a.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PaulinoEx8.11a.R +\name{PaulinoEx8.11a} +\alias{PaulinoEx8.11a} +\title{Comportamento Predatório da Jararaca} +\format{Um \code{data.frame} com 8 observações e 4 variáveis, em que + +\describe{ + +\item{\code{pigm}}{Pigmentação da serpente (escura, albina).} + +\item{\code{peso}}{Peso relativo da serpente (menor, maior).} + +\item{\code{bote}}{Bote predatório (sim, não).} + +\item{\code{freq}}{Frequência observada.} + +}} +\source{ +Paulino, C. D., Singer, J. M. (2006). Análise de Dados + Categorizados (1st ed.). São Paulo, SP: Edgard Blucher. + (Exercício 8.11 a, pág. 244). +} +\description{ +Estudo envolvendo o comportamento predatório em + cativeiro da jararaca (uma das serpentes mais venenosas do + Brasil). Objetivo do exercício é analisar os dados estudando o + efeito das características das presas na proporção teória de + botes predatórios. +} +\examples{ + +str(PaulinoEx8.11a) + +xt <- xtabs(freq ~ pigm + peso + bote, data = PaulinoEx8.11a) +xt + +library(lattice) + +barchart(xt, + horizontal = FALSE, + beside = FALSE, + stack = FALSE, + auto.key = list(space = "top", columns = 2, + cex.title = 1, rectangles = TRUE, + points = FALSE, title = "Bote predatório"), + xlab = "Pigmentação", + ylab = "Frequência") + +} +\keyword{binomial} +\keyword{contingência} +