Skip to content

Instantly share code, notes, and snippets.

@AngelBerihuete
Created December 1, 2017 08:24
Show Gist options
  • Save AngelBerihuete/02324aa2a110c61118d728861535563a to your computer and use it in GitHub Desktop.
Save AngelBerihuete/02324aa2a110c61118d728861535563a to your computer and use it in GitHub Desktop.
[rtip] Macro-regions analysis
require(rtip)
data(LCS2014)
# Set up dataset for Spain
ESdataset <- setupDataset(LCS2014, country = "ES")
# Set up dataset for Andalusia according to code in NUTS-2
#
# https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Spain
ES64dataset <- setupDataset(LCS2014, country = "ES", region = "ES64")
# macro-region according to code ES1 in NUTS-1:
# Galicia, Principality of Asturias and Cantabria
#
# https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Spain
ES11dataset <- setupDataset(LCS2014, country = "ES", region = "ES11")
ES12dataset <- setupDataset(LCS2014, country = "ES", region = "ES12")
ES13dataset <- setupDataset(LCS2014, country = "ES", region = "ES13")
ES1dataset <- rbind(ES11dataset, ES12dataset, ES13dataset)
# Then it's possible to do a statistical hypothesis testing involving
# Andalusia (ES64) and the macro-region (ES1)
testTIP(ES64dataset, ES1dataset, same.arpt.value = arpt(ESdataset))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment