Giter VIP home page Giter VIP logo

conboe / testing-the-oswald-hypothesis-with-european-country-level-data Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.09 MB

We use data from EuroStat from the 2000s and 2010s for a ls-regression of unemployment using the homeownership rate. We do this to test the Oswald Hypothesis.

Home Page: https://doi.org/10.5281/zenodo.4679520

License: MIT License

R 100.00%
oswald-hypothesis ls-regression economics unemployment-rate homeownership

testing-the-oswald-hypothesis-with-european-country-level-data's Introduction

Testing-the-Oswald-Hypothesis-with-European-Country-Level-Data

Abstract

The Oswald Hypothesis was first introduced by A.J. Oswald in 1996 where he pointed out a correlation between homeownership rate and the unemployment rate on a state level. He used simple LS-Regression on the data of the 1960s and 1990s as well as a LS-Regression on the 20-years-changes of these two rates. In all three Regressions he found a positiv correlation. We want to recreate this experiment with european data from the 2000s and 2010s on a nation level and see if the Hypothesis holds. We find that the evidence is weak at best before the finacial crisis but becomes more sustainable after it.

Structur Explained

Data

The data downloaded from EuroStat as well as the filtered data can be found in the folder 'data'. The downloaded file 'ilc_lvho02.tsv' contains multiple timeseries of different nations on homeownership rate as well as additional catagories we do not use. The file 'lfsa_urgan.tsv' contains multiple timeseries of different nations on unemplyoment rate rate as well as additional catagories we do not use. The file 'ownership_rate.csv' contains the filtered data on homeownership that we use for the analysis. The file 'ownership_rate_flags.csv' contains the error flags for the data from in 'ownership_rate.csv'. The file 'unemployment_rate.csv' contains the filtered data on unemployment that we use for the analysis. The file 'unemployment_rate_flags.csv' contains the error flags for the data from in 'unemployment_rate.csv'.

The files 'ilc_lvho02.tsv' and 'lfsa_urgan.tsv' have a simular structur. The first column contains a multible of variables (incgrp,hhtyp,tenure geo for ilc_lvho02.tsv and unit,sex,age,citizen,geo for lfsa_urgan.tsv) which combine to one factor. Each following column contains the values for one year. They also contain errorflags, which are letters indicating posisble statistical problems with the specific value (e.g. small samplesize, timeseries breaks,...).

Meanings of the variables in the first coulmn and there values can be found in the codelist.

Codelists

The codelists can be found in the folder 'codelists'. Codelist give explainations of the factor variables and there values. The meaning of the varible itself can be found in 'dimlst.dic'. The meaning of each value of these variables can be found in the acording .dic file.

Graphics

The three graphics produced by the code can be found in the folder 'graphics'.

Code

The code can be found in the rood directory of this repository. The two files are 'os_filter.R' and 'os_analysis'. For further information on them see the 'how to use' section of this README file.

Metadata

Metadata in sdmx format can be found in the folder 'metadata' in zip files. For information on SDMX as well as tools refere to the EuroStat information website on SDMX.

How to Use

The R code is written for R version 4.0.3 (2020-10-10).

The code is seperated into two files in the root directory, 'os_filter.r' and 'os_analysis.R'. Before exicuting them one must download the files 'ilc_lvho02.tsv' and 'lfsa_urgan.tsv' manuelly. This is either possible:

  1. from EuroStat using the code ilc_lvho02 and lfsa_urgan in the search function of the website and clicking the 'download tsv' button. This will download a .zip file that must be unpacked (use WinRa or a simular free software).
  2. from this reposetory directly.

(functionally of the code can not be garunteed for newly downloaded data from EuroStat due to possible structural changes)

Save the files in a folder that you name 'data' and use the setwd function in R to the path where this folder is stored. ( type '?setwd' in the R console for help).

Execute the r skript 'filter.R'. This will creat multiple files in 'data', the most important being 'ownership_rate.csv', 'unemployment_rate.csv','ownership_rate_flags.csv' and 'unemployment_rate_flags.csv'. There content is explained in the subsection above.

Execute the R skript 'os_analysis.R' to create PNG plots in a folder 'graphics' in the current working directory.

testing-the-oswald-hypothesis-with-european-country-level-data's People

Contributors

conboe avatar

Watchers

 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.