| |
| |
| |
| |
|
|
| rm(list = ls()) |
| require(foreign) |
| require(ggplot2) |
| require(RColorBrewer) |
| require(scales) |
| require(plyr) |
| require(dplyr) |
| require(tidyr) |
| require(extrafont) |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
| aesthetics <- list( |
| |
| |
| |
| |
| theme_bw(), |
| theme( |
| legend.title=element_blank(), |
| |
| |
| panel.grid.minor=element_blank(), |
| panel.grid.major=element_blank(), |
| |
| |
| |
| axis.text.y=element_text(face="bold"), |
| axis.title.y=element_text(face="bold"))) |
| |
| |
| |
|
|
| Multiplier <- 1.96 |
|
|
| |
|
|
| |
| ests <- read.csv(file = "./Output/Parmest_EHPM_PGs.csv") |
| |
| |
| |
| |
| |
| |
| ests <- filter(ests, parm == "std_Above500") |
| ests$label <- as.character(ests$label) |
| |
| ests$idstr <- c("Bank or Credit Association","Public Phone","Internet", |
| "Bus Stop", "Park and/or\nSoccer Field", |
| "Post Office", "Market", "Health Center", |
| "Police Station", "Paved Road") |
| |
| |
| |
| |
| |
| MatrixofModels <- ests[c("idstr", "estimate","stderr","t","p")] |
| colnames(MatrixofModels) <- c("Dependent Variable", "Estimate", "StandardError", "TValue", "PValue") |
| MatrixofModels$`Dependent Variable` <- factor(MatrixofModels$`Dependent Variable`, levels = MatrixofModels$`Dependent Variable`) |
| |
| |
| |
| OutputPlot <- qplot(`Dependent Variable`, Estimate, ymin = Estimate - Multiplier * StandardError, |
| ymax = Estimate + Multiplier * StandardError, data = MatrixofModels, geom = "pointrange", |
| ylab = NULL, xlab = NULL) |
| |
| OutputPlot <- OutputPlot + geom_hline(yintercept = 0, lwd = I(7/12), colour = I(hsv(0/12, 7/12, 7/12)), alpha = I(5/12)) |
| x_title <-expression(atop(bold("Dependent Variable "),italic("\n(Time to the Neearest)"))) |
|
|
| OutputPlot <- OutputPlot + theme_bw() + ylab("Estimated Effect: Above 500 ha") + |
| aesthetics + xlab(x_title) + coord_flip() |
| |
| OutputPlot |
| |
| ggsave(filename="./Output/CoefPlot_PGDistance.pdf") |
| |
| |