################################################################## # # MAPA DA VIOLÊNCIA 2015 # HOMICÍDIO DE MULHERES NO BRASIL # Julio Jacobo Waiselfisz # www.flacso.org.br # # Taxas de homicídio de mulheres (por 100 mil) por UF. Brasil. 2003/2013 # ################################################################## uf = c("ac","ap","am","pa","rd","ro","to","al","ba","ce","ma","pa","pe","pi","rn", "se","es","mg","rj","sp","pr","rs","sc","df","go","mt","ms") data = read.csv("violencia.csv",header=TRUE) taxas = as.matrix(data[,2:12]) ylabel = "Taxas de homicídio de mulheres (por 100 mil)" plot(2003:2013,taxas[1,],ylim=range(taxas),xlab="Anos",ylab=ylabel,type="l") for (i in 2:27) lines(2003:2013,taxas[i,],col=i) boxplot.matrix(taxas,names=2003:2013,ylab=ylabel) plot(taxas[,1],taxas[,11],xlab="Taxas de homicídio de mulheres (por 100 mil) em 2003",ylab="Taxas de homicídio de mulheres (por 100 mil) em 2013",xlim=c(0,15),ylim=c(0,15),pch=16) abline(lm(taxas[,11]~taxas[,1]),col=2) abline(v=0,lty=3) abline(h=0,lty=3) plot(2003:2013,taxas[19,],ylim=c(2,7),xlab="Anos",ylab=ylabel,type="b",lwd=2) lines(2003:2013,taxas[20,],col=2,type="b",lwd=2) lines(2003:2013,0.67*taxas[19,],col=3,type="b",lwd=2) legend("topright",legend=c("RJ","SP","0.67*RJ"),col=1:3,lty=1,lwd=2) plot(taxas[19,],taxas[20,],col=1,xlab="Rio de Janeiro",ylab="Sao Paulo",type="l", lty=3,xlim=c(0,7),ylim=c(0,7)) text(taxas[19,],taxas[20,],3:13) title(ylabel) abline(0,1,lty=2) abline(v=0,lty=3) abline(h=0,lty=3) abline(lm(taxas[20,]~taxas[19,]),col=2) abline(lm(taxas[20,]~taxas[19,]-1),col=3) reg = lm(taxas[20,]~taxas[19,]) summary(reg) reg.origem = lm(taxas[20,]~taxas[19,]-1) summary(reg.origem) tempo = 1:11 coefs = matrix(0,27,2) for (i in 1:27) coefs[i,] = lm(taxas[i,]~tempo)$coef ord=order(coefs[,2]) plot(coefs[ord,2],axes=FALSE,xlab="UF",ylab="inclinacao (b)") axis(2);box() axis(1,at=1:27,label=uf[ord]) cbind(uf[ord],coefs[ord,2]) title("Taxa(t) = a + b *t + erro") plot(2003:2013,taxas[6,],type="b",lwd=2,ylim=c(2,15),xlab="Anos",ylab=ylabel) lines(2003:2013,taxas[19,],col=2,type="b",lwd=2) lines(2003:2013,taxas[4,],col=3,type="b",lwd=2) lines(2003:2013,taxas[20,],col=4,type="b",lwd=2) legend("topleft",legend=c("RO","RJ","PA","SP"),col=1:4,lty=1,lwd=2) for (i in 2:12) abline(h=i,lty=3)