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")
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")]
r ncol(factorReturns)
factors across 3 regions: U.S.; International Developed; and Emerging. 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
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)
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)]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.