Hi, I have this data set: obitoss = c( 5.8,17.4,5.9,17.6,5.8,17.5,4.7,15.8, 3.8,13.4,3.8,13.5,3.7,13.4,3.4,13.6, 4.4,17.3,4.3,17.4,4.2,17.5,4.3,17.0, 4.4,13.6,5.1,14.6,5.7,13.5,3.6,13.3, 6.5,19.6,6.4,19.4,6.3,19.5,6.0,19.7) (dados = data.frame( regiao = factor(rep(c('Norte', 'Nordeste', 'Sudeste', 'Sul', 'Centro-Oeste'), each=8)), ano = factor(rep(c('2000','2001','2002','2003'), each=2)), sexo = factor(rep(c('F','M'), 4)), resp=obitoss)) I would like to make a mosaic to represent the numeric variable depending on 3 variables. Does anyone know how to do? -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346
I've typically used mosaic plots with categorical data - not sure what the numerical values represent. This fits a mosaic plot by rounding the values: library(vcd) t <- xtabs(resp ~ sexo + regiao + ano, data = dados) ft <- ftable(round(t)) cotabplot(ft, panel = cotab_coindep, type = "mosaic") Sam Thomas -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Silvano Sent: Wednesday, March 24, 2010 11:01 AM To: r-help at r-project.org Subject: [R] Mosaic Hi, I have this data set: obitoss = c( 5.8,17.4,5.9,17.6,5.8,17.5,4.7,15.8, 3.8,13.4,3.8,13.5,3.7,13.4,3.4,13.6, 4.4,17.3,4.3,17.4,4.2,17.5,4.3,17.0, 4.4,13.6,5.1,14.6,5.7,13.5,3.6,13.3, 6.5,19.6,6.4,19.4,6.3,19.5,6.0,19.7) (dados = data.frame( regiao = factor(rep(c('Norte', 'Nordeste', 'Sudeste', 'Sul', 'Centro-Oeste'), each=8)), ano = factor(rep(c('2000','2001','2002','2003'), each=2)), sexo = factor(rep(c('F','M'), 4)), resp=obitoss)) I would like to make a mosaic to represent the numeric variable depending on 3 variables. Does anyone know how to do? -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346 ______________________________________________ R-help at r-project.org mailing list stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
When you click search on the R homepage, type "mosaic" into the box, and click the button, do the top 3 links seem relevant ? Your previous 2 requests for help : 26 Feb : Response was SuppDists. Yet that is the first hit returned by the subject line you posted : "Hartleys table" 22 Feb : Response was shapiro.test. Yet that is in the second hit returned by the subject line you posted : "normality in split plot design" Spot the pattern ? "Silvano" <silvano at uel.br> wrote in message news:A9322645C4F846A3A6A9DAAA8B5A265D at ccePC... Hi, I have this data set: obitoss = c( 5.8,17.4,5.9,17.6,5.8,17.5,4.7,15.8, 3.8,13.4,3.8,13.5,3.7,13.4,3.4,13.6, 4.4,17.3,4.3,17.4,4.2,17.5,4.3,17.0, 4.4,13.6,5.1,14.6,5.7,13.5,3.6,13.3, 6.5,19.6,6.4,19.4,6.3,19.5,6.0,19.7) (dados = data.frame( regiao = factor(rep(c('Norte', 'Nordeste', 'Sudeste', 'Sul', 'Centro-Oeste'), each=8)), ano = factor(rep(c('2000','2001','2002','2003'), each=2)), sexo = factor(rep(c('F','M'), 4)), resp=obitoss)) I would like to make a mosaic to represent the numeric variable depending on 3 variables. Does anyone know how to do? -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346