Giter Site home page Giter Site logo

dsanchezp18 / hbc-ctol Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 55.6 MB

This is the source code (R) for my Bachelor's thesis for the degree of Economics, BA in Universidad San Francisco de Quito (Ecuador). Between 2014-2016, corruption tolerance greatly increased in Ecuador. Why? In memory of the late Jorge Pazmiño (1941-2021).

TeX 100.00%
r rstudio latex tex knitr sweave economics econometrics logit probability corruption interaction-terms

hbc-ctol's Introduction

Honesty by Convenience: Corruption Tolerance in Ecuador (README)

This is the source code (R) for my Bachelor's thesis for the degree of Economics, BA in Universidad San Francisco de Quito (Ecuador). Between 2014-2016, corruption tolerance greatly increased in Ecuador. Why?

In memory of the late Jorge Pazmiño (1941-2021).

I've taken great care in trying to ensure maximum reproducibility of my research "paper". Thus, one of the things I have done is upload all the code required to compile a revised version of the document. This version includes minor revisions in format for a better reading experience and some eliminated elements due to copyright reasons. More info about this can be found in the paper itself. The version which includes the graph that I removed due to copyright reasons can be found on my personal website.

So here you will be able to find my paper and reproduce it completely. I assume you are already knowledgeable of R, RStudio and LaTeX. However, if you're not and you still want to use my code, I recommend learning LaTeX from the Overleaf tutorials and perhaps from here too, R from the R For Data Science marvelous textbook and sweave/knitr (the integration of LaTeX and R) from this other textbook. I've compiled a list of resources which I've found helpful to learn software, which can be found on my website. There you'll find a guide (in spanish) on how to use AmericasBarometer data with R.

However, there are some things that need to be considered before doing so:

  • Obviously you'll first need to have an R distribution installed, as well as Rstudio.

  • You'll need to download a LaTeX distribution. TeX Live is the one that I use. Some instructions can be found here.

  • You'll have to set up your global options in RStudio so that .Rnw files are weaved with knitr, and that the compiler is XeLaTeX. Otherwise, the Times New Roman font mandated by my university won't work for you (and who knows what other sorts of errors will appear).

  • The execution of the main_file.rnw file will compile the complete document. However, to compile the child documents in standalone mode, the paths in this main file for the loading of databases must be changed to absolute paths. This means that, instead of load('databases/lapop_ecu.Rdata') you'll have to change it to load(C:\Users\Daniel Sanchez\Documents\personal\hbc-ctolecu), changing the C:\\... to wherever you loaded the uncompressed package. If you do not do this, you'll get the following error: Error in readChar(con, 5L, useBytes = TRUE): cannot open the connection. You'll have to rinse and repeat for the other three load() commands to load the remaining dataframes. The same thing should be done to the \addbibresource command in the main file preamble if you want to generate standalone bibliographies. I'm currently working on a solution for this.

You can find another repository, hbc-prelim, where I included more R code which I used to wrangle and analyze the data and be able to manipulate and create the dataframes that I load on this project. The df and df46 dataframes that I load in this repository are created from scratch there. If you'd like to replicate my results using the freely available LAPOP Americas Barometer as seen here, do take a look at that repository.

These are the only things you'll need to do, to my own knowledge, to easily compile the paper into your own computer. Please, please let me know if you run into any issues, I'll do my best trying to help you: [email protected]. I am also open to suggestions, criticisms, comments and anything else you might need.

A spanish version of the document will be made available soon.

This repository and all those that are created in relation to it are a tribute to my late grandfather, Jorge Enrique Pazmiño Rodríguez. In his desire to see his grandsons foster a freer, fairer, and worthier society, I have tried to contribute by posting my research for the world to use. I hope it makes a difference.

Thank you for reading, and happy analysis!

Regards,

Daniel

hbc-ctol's People

Contributors

dsanchezp18 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.