This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ### Import libraries | |
using CSV | |
using DataFrames | |
using Turing | |
using Plots | |
using StatsBase | |
using StatsFuns: logistic | |
using MLBase | |
# ### Prepare data |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Installs the latest RStudio daily desktop build for OSX/macOS and Ubuntu(amd64) | |
# | |
# https://support.rstudio.com/hc/en-us/articles/203842428-Getting-the-newest-RStudio-builds | |
set -e | |
install_macos_daily() { | |
REDIRECT_URL="https://www.rstudio.org/download/latest/daily/desktop/mac/RStudio-latest.dmg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------------------------------------- | |
# Author: Graeme Walsh Date: 22/10/2014 | |
# Title: "AMECO Example 1.R" | |
# Description: A script demonstrating how to access data from the AMECO database. | |
# Note: (to self) revise style and remove some hard coding. | |
# -------------------------------------------------------------------------------- | |
# For illustrative purposes, let's get Annual Unemployment data for Ireland. | |
# Shown is how to import the data - in addition to some munging. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Function to cross-validate a time series. | |
cv.ts <- function(x, FUN, tsControl, xreg=NULL, ...) { | |
#Load required packages | |
stopifnot(is.ts(x)) | |
stopifnot(is.data.frame(xreg) | is.matrix(xreg) | is.null(xreg)) | |
stopifnot(require(forecast)) | |
stopifnot(require(foreach)) | |
stopifnot(require(plyr)) |