knitr::opts_chunk$set(echo = FALSE)
library(factorModel)
data("factorReturns", package = "factorModel")
data("factorReturns.Intl", package = "factorModel")
data("factorReturns.US", package = "factorModel")
data("factorReturns.EM", package = "factorModel")
data("factorGroups", package = "factorModel")

Overview

This vignette describes the data included with the factorModel package.
Here are the datasets included with the package.

datasetlist <- (data(package="factorModel"))
datasetlist$results[, c("Item", "Title")]

Below are the returns for a few months for each region's factors.

cat("U.S.\n")
head(factorReturns.US)
tail(factorReturns.US)

cat("\n\nInternational Developed\n")
head(factorReturns.Intl)
tail(factorReturns.Intl)

cat("\n\nEmerging\n")
head(factorReturns.EM)
tail(factorReturns.EM)

cat("\n\nFactor Groups\n")
factorGroups

Summary of Data

Below is a summary of the distribution of each factor. Note that the three regions have different lengths of data series. There are no obvious outliers.

summary(factorReturns)

Correlations

The following tables show the correlations. We worry about correlations above 0.7 causing multi-collinearity in regressions.

cat("U.S.\n")
plot_corr(cor(factorReturns.US[,2:ncol(factorReturns.US)]))
cat("\n\nInternational\n")
plot_corr(cor(factorReturns.Intl[,2:ncol(factorReturns.Intl)]))
cat("\n\nEmerging\n")
plot_corr(cor(factorReturns.EM[,2:ncol(factorReturns.EM)]))


rexmacey/factorModel documentation built on Oct. 2, 2019, 1:25 a.m.