diff --git a/R/PaulinoEx9.29.R b/R/PaulinoEx9.29.R new file mode 100644 index 0000000000000000000000000000000000000000..8517d3f17e7c028f9e3cf84a6c3d7ee628b67cf1 --- /dev/null +++ b/R/PaulinoEx9.29.R @@ -0,0 +1,44 @@ +#' @name PaulinoEx9.29 +#' @title ???? +#' @description Em um estudo sobre a avaliação de políciais militares +#' brancos por soldados americanos negros na Segunda Guerra Mundial, +#' a resposta de cada soldado foi categorizada nos níveis 1 (quase +#' sempre imparcial), 2 (parcial e imparcial em proporções iguais) e +#' 3 (quase sempre parcial) +#' @format Um \code{data.frame} com 12 observações e 4 variáveis, em que +#' +#' \describe{ +#' +#' \item{\code{orig}}{Região de origem (Norte ou Sul).} +#' +#' \item{\code{unid}}{Região da unidade (Norte ou Sul).} +#' +#' \item{\code{condu}}{Avaliação da conduta. (1, 2, ou 3)} +#' +#' \item{\code{freq}}{Frequências observadas.} +#' +#' } +#' @keywords TC multinomial +#' @source PAULINO; SINGER (2006), Exercício 9.29, pág. 343. +#' @examples +#' +#' data(PaulinoEx9.29) +#' +#' str(PaulinoEx9.29) +#' +#' xt <- xtabs(freq ~ ., data = PaulinoEx9.29) +#' ftable(xt) +#' +#' library(lattice) +#' +#' barchart(xt, +#' horizontal = FALSE, +#' beside = FALSE, +#' stack = FALSE, +#' auto.key = list(space = "top", columns = 3, cex.title = 1, +#' rectangles = TRUE, points = FALSE, +#' title = "Avaliação da conduta"), +#' xlab = "Região de origem", +#' ylab = "Frequência") +#' +NULL \ No newline at end of file diff --git a/data-raw/PaulinoEx9.29.txt b/data-raw/PaulinoEx9.29.txt new file mode 100644 index 0000000000000000000000000000000000000000..c6edbc264c476d99a75d0c7f3fc6c9c0c7cb9800 --- /dev/null +++ b/data-raw/PaulinoEx9.29.txt @@ -0,0 +1,13 @@ +orig unid condu freq +norte norte 1 118 +norte norte 2 207 +norte norte 3 134 +norte sul 1 181 +norte sul 2 514 +norte sul 3 542 +sul norte 1 253 +sul norte 2 313 +sul norte 3 200 +sul sul 1 653 +sul sul 2 1006 +sul sul 3 760 diff --git a/data/PaulinoEx9.29.rda b/data/PaulinoEx9.29.rda new file mode 100644 index 0000000000000000000000000000000000000000..1b69c88676a9aafc596ee9db523d3eb76e14efb7 Binary files /dev/null and b/data/PaulinoEx9.29.rda differ diff --git a/man/PaulinoEx9.29.Rd b/man/PaulinoEx9.29.Rd new file mode 100644 index 0000000000000000000000000000000000000000..769adeea9b61a9f4f7f4aba1ee602c939228c931 --- /dev/null +++ b/man/PaulinoEx9.29.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PaulinoEx9.29.R +\name{PaulinoEx9.29} +\alias{PaulinoEx9.29} +\title{????} +\format{Um \code{data.frame} com 12 observações e 4 variáveis, em que + +\describe{ + +\item{\code{orig}}{Região de origem (Norte ou Sul).} + +\item{\code{unid}}{Região da unidade (Norte ou Sul).} + +\item{\code{condu}}{Avaliação da conduta. (1, 2, ou 3)} + +\item{\code{freq}}{Frequências observadas.} + +}} +\source{ +PAULINO; SINGER (2006), Exercício 9.29, pág. 343. +} +\description{ +Em um estudo sobre a avaliação de políciais militares + brancos por soldados americanos negros na Segunda Guerra Mundial, + a resposta de cada soldado foi categorizada nos níveis 1 (quase + sempre imparcial), 2 (parcial e imparcial em proporções iguais) e + 3 (quase sempre parcial) +} +\examples{ + +data(PaulinoEx9.29) + +str(PaulinoEx9.29) + +xt <- xtabs(freq ~ ., data = PaulinoEx9.29) +ftable(xt) + +library(lattice) + +barchart(xt, + horizontal = FALSE, + beside = FALSE, + stack = FALSE, + auto.key = list(space = "top", columns = 3, cex.title = 1, + rectangles = TRUE, points = FALSE, + title = "Avaliação da conduta"), + xlab = "Região de origem", + ylab = "Frequência") + +} +\keyword{TC} +\keyword{multinomial} +