In this file I have done the Exploratory Data Analysis of Our WQD-7006 Project
I have formatted our data set and named “myr3.csv” to do EDA in R. The data set is available in this link
https://drive.google.com/file/d/1rXhO170CY82E7ujXhN1EXsCmuloVLfTg/view?usp=sharing
Loading necessary library
library("readxl")
## Warning: package 'readxl' was built under R version 4.2.2
library("ggplot2")
## Warning: package 'ggplot2' was built under R version 4.2.2
library("dplyr")
## Warning: package 'dplyr' was built under R version 4.2.2
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library("corrplot")
## Warning: package 'corrplot' was built under R version 4.2.2
## corrplot 0.92 loaded
library("gridExtra")
## Warning: package 'gridExtra' was built under R version 4.2.2
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
Reading the data set into a dataframe
Attribute meaning in the data frame moed = Month Ende Date, mpr = Malaysian Policy Rate, upr = US Policy Rate, mcpi = Malaysia CPI, mnbfbf = Malaysia Net foreign bond flow, mfr = Malaysia Foreign Reserve, bco = Brent Crude Oil Price, metb = Malaysia External trade Balance, uscpi = US CPI, mgdpqa = Malaysia GDP- QA, myrer = MYR exchange rate
df <- read.csv("myr3.csv")
View(df)
Exploring the structure of the data set
str(df)
## 'data.frame': 205 obs. of 11 variables:
## $ moed : chr "2005-10-31'T'00:00:00" "2005-11-30'T'00:00:00" "2005-12-31'T'00:00:00" "2006-01-31'T'00:00:00" ...
## $ mpr : num 2.7 3 3 3 3.25 3.25 3.5 3.5 3.5 3.5 ...
## $ upr : num 3.75 4 4.25 4.5 4.5 4.75 4.75 5 5.25 5.25 ...
## $ mcpi : num 3.3 3.5 3.5 3.2 3.2 4.8 4.6 3.9 3.9 4.1 ...
## $ mnfbf : num -1510.7 -1104.9 70.6 -84.6 1398.1 ...
## $ mfr : num 77.1 73.1 70.5 71.3 72.2 ...
## $ bco : num 58.1 55 59 66 61.8 ...
## $ metb : num 10.62 9.1 9.77 9.03 7.68 ...
## $ uscpi : num 4.3 3.5 3.4 4 3.6 3.4 3.5 4.2 4.3 4.1 ...
## $ mgdpqa: num 4.7 4.7 4.7 4.7 4.6 5.7 5.7 5.7 5.6 5.6 ...
## $ myrer : num 3.77 3.78 3.78 3.75 3.71 ...
Checking for missing values
sum(is.na(df))
## [1] 0
Finding out the correlation
correlations <- cor(select_if(df, is.numeric))
corrplot(correlations,method = 'color', order = 'alphabet')
Visualizing the distribution of each variable
p1 <- ggplot(df, aes(x=df$mpr)) + geom_histogram(bins=30)
p2 <- ggplot(df, aes(x=df$upr)) + geom_histogram(bins=30)
p3 <- ggplot(df, aes(x=df$mcpi)) + geom_histogram(bins=30)
p4 <- ggplot(df, aes(x=df$mnfbf)) + geom_histogram(bins=30)
p5 <- ggplot(df, aes(x=df$mfr)) + geom_histogram(bins=30)
p6 <- ggplot(df, aes(x=df$bco)) + geom_histogram(bins=30)
p7 <- ggplot(df, aes(x=df$metb)) + geom_histogram(bins=30)
p8 <- ggplot(df, aes(x=df$uscpi)) + geom_histogram(bins=30)
p9 <- ggplot(df, aes(x=df$mgdpqa)) + geom_histogram(bins=30)
p10 <- ggplot(df, aes(x=df$myrer)) + geom_histogram(bins=30)
grid.arrange(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, nrow = 2, ncol = 5)
## Warning: Use of `df$mpr` is discouraged.
## ℹ Use `mpr` instead.
## Warning: Use of `df$upr` is discouraged.
## ℹ Use `upr` instead.
## Warning: Use of `df$mcpi` is discouraged.
## ℹ Use `mcpi` instead.
## Warning: Use of `df$mnfbf` is discouraged.
## ℹ Use `mnfbf` instead.
## Warning: Use of `df$mfr` is discouraged.
## ℹ Use `mfr` instead.
## Warning: Use of `df$bco` is discouraged.
## ℹ Use `bco` instead.
## Warning: Use of `df$metb` is discouraged.
## ℹ Use `metb` instead.
## Warning: Use of `df$uscpi` is discouraged.
## ℹ Use `uscpi` instead.
## Warning: Use of `df$mgdpqa` is discouraged.
## ℹ Use `mgdpqa` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
Exploring the relationship between between the target variable and each predictor variable
p11 <- ggplot(df, aes(x=df$mpr, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Malaysian Policy Rate") +
ylab("Malaysian Exchange Rate")
p11
## Warning: Use of `df$mpr` is discouraged.
## ℹ Use `mpr` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$mpr` is discouraged.
## ℹ Use `mpr` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p12 <- ggplot(df, aes(x=df$upr, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("US Policy Rate") +
ylab("Malaysian Exchange Rate")
p12
## Warning: Use of `df$upr` is discouraged.
## ℹ Use `upr` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$upr` is discouraged.
## ℹ Use `upr` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p13 <- ggplot(df, aes(x=df$mcpi, y=df$myrer)) + geom_point() + geom_smooth(method=lm)+ xlab("Malaysian CPI") +
ylab("Malaysian Exchange Rate")
p13
## Warning: Use of `df$mcpi` is discouraged.
## ℹ Use `mcpi` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$mcpi` is discouraged.
## ℹ Use `mcpi` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p14 <- ggplot(df, aes(x=df$mnfbf, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Malaysia Net Foreign Bond Flow") +
ylab("Malaysian Exchange Rate")
p14
## Warning: Use of `df$mnfbf` is discouraged.
## ℹ Use `mnfbf` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$mnfbf` is discouraged.
## ℹ Use `mnfbf` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p15 <- ggplot(df, aes(x=df$mfr, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Malaysia Foreign Reserve") +
ylab("Malaysian Exchange Rate")
p15
## Warning: Use of `df$mfr` is discouraged.
## ℹ Use `mfr` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$mfr` is discouraged.
## ℹ Use `mfr` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p16 <- ggplot(df, aes(x=df$bco, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Brent Crude Oil Price") +
ylab("Malaysian Exchange Rate")
p16
## Warning: Use of `df$bco` is discouraged.
## ℹ Use `bco` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$bco` is discouraged.
## ℹ Use `bco` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p17 <- ggplot(df, aes(x=df$metb, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Malaysian External Trade Balance") +
ylab("Malaysian Exchange Rate")
p17
## Warning: Use of `df$metb` is discouraged.
## ℹ Use `metb` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$metb` is discouraged.
## ℹ Use `metb` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p18 <- ggplot(df, aes(x=df$uscpi, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("US CPI") +
ylab("Malaysian Exchange Rate")
p18
## Warning: Use of `df$uscpi` is discouraged.
## ℹ Use `uscpi` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$uscpi` is discouraged.
## ℹ Use `uscpi` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
p19 <- ggplot(df, aes(x=df$mgdpqa, y=df$myrer)) + geom_point() + geom_smooth(method=lm) + xlab("Malaysian GDP QA") +
ylab("Malaysian Exchange Rate")
p19
## Warning: Use of `df$mgdpqa` is discouraged.
## ℹ Use `mgdpqa` instead.
## Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## Warning: Use of `df$mgdpqa` is discouraged.
## ℹ Use `mgdpqa` instead.
## Warning: Use of `df$myrer` is discouraged.
## ℹ Use `myrer` instead.
## `geom_smooth()` using formula = 'y ~ x'
Here we are trying to find out if there is any outliers Drawing boxplot of each variable
ggplot(df, aes(x=df$mpr)) + geom_boxplot() + xlab("Malaysian Policy Rate")
## Warning: Use of `df$mpr` is discouraged.
## ℹ Use `mpr` instead.
ggplot(df, aes(x=df$upr)) + geom_boxplot() + xlab("US Policy Rate")
## Warning: Use of `df$upr` is discouraged.
## ℹ Use `upr` instead.
ggplot(df, aes(x=df$mcpi)) + geom_boxplot() + xlab("Malaysian CPI")
## Warning: Use of `df$mcpi` is discouraged.
## ℹ Use `mcpi` instead.
ggplot(df, aes(x=df$mnfbf)) + geom_boxplot() + xlab("Malaysia Net Foreign Bond Flow")
## Warning: Use of `df$mnfbf` is discouraged.
## ℹ Use `mnfbf` instead.
ggplot(df, aes(x=df$mfr)) + geom_boxplot() + xlab("Malaysia Foreign Reserve")
## Warning: Use of `df$mfr` is discouraged.
## ℹ Use `mfr` instead.
ggplot(df, aes(x=df$bco)) + geom_boxplot() + xlab("Brent Crude Oil Price")
## Warning: Use of `df$bco` is discouraged.
## ℹ Use `bco` instead.
ggplot(df, aes(x=df$metb)) + geom_boxplot() + xlab("Malaysian External Trade Balance")
## Warning: Use of `df$metb` is discouraged.
## ℹ Use `metb` instead.
ggplot(df, aes(x=df$uscpi)) + geom_boxplot() + xlab("US CPI")
## Warning: Use of `df$uscpi` is discouraged.
## ℹ Use `uscpi` instead.
ggplot(df, aes(x=df$mgdpqa)) + geom_boxplot() + xlab("Malaysian GDP QA")
## Warning: Use of `df$mgdpqa` is discouraged.
## ℹ Use `mgdpqa` instead.
Calculating the Z-score of each value in the data The Z-score, also known as the standard score, is a measure of how many standard deviations a value is from the mean of a distribution. It is commonly used to identify outliers in a dataset, as values with a Z-score greater than 3 or less than -3 are considered to be unusual or extreme.
The Z-score is useful for identifying outliers because it standardizes the data, making it easier to compare values from different distributions. For example, if you have two datasets with different means and standard deviations, the Z-score allows you to compare the values in the two datasets on a common scale.
In addition to identifying outliers, the Z-score is also useful for identifying trends or patterns in the data. For example, if the Z-score of a series of values is consistently positive or negative, it may indicate that the values are increasing or decreasing over time.
Overall, the Z-score is an important tool for data analysis because it helps you to understand the distribution of your data and identify unusual or interesting values.
data_z <- df %>% mutate_if(is.numeric, scale)
data_z
## moed mpr upr mcpi mnfbf
## 1 2005-10-31'T'00:00:00 -0.2959445 1.54197189 0.58070253 -0.556877853
## 2 2005-11-30'T'00:00:00 0.2441323 1.69427458 0.68941853 -0.460995610
## 3 2005-12-31'T'00:00:00 0.2441323 1.84657727 0.68941853 -0.183248996
## 4 2006-01-31'T'00:00:00 0.2441323 1.99887997 0.52634453 -0.219919582
## 5 2006-02-28'T'00:00:00 0.6941963 1.99887997 0.52634453 0.130412111
## 6 2006-03-31'T'00:00:00 0.6941963 2.15118266 1.39607252 -0.240215996
## 7 2006-04-30'T'00:00:00 1.1442604 2.15118266 1.28735652 0.113612635
## 8 2006-05-31'T'00:00:00 1.1442604 2.30348535 0.90685053 -0.070874440
## 9 2006-06-30'T'00:00:00 1.1442604 2.45578804 0.90685053 -0.111372756
## 10 2006-07-31'T'00:00:00 1.1442604 2.45578804 1.01556653 0.035215079
## 11 2006-08-31'T'00:00:00 1.1442604 2.45578804 0.58070253 0.246850675
## 12 2006-09-30'T'00:00:00 1.1442604 2.45578804 0.58070253 -0.173726930
## 13 2006-10-31'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.225897455
## 14 2006-11-30'T'00:00:00 1.1442604 2.45578804 0.41762853 -0.233174865
## 15 2006-12-31'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.072292117
## 16 2007-01-31'T'00:00:00 1.1442604 2.45578804 0.52634453 0.085448112
## 17 2007-02-28'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.485096125
## 18 2007-03-31'T'00:00:00 1.1442604 2.45578804 -0.39774146 0.492935830
## 19 2007-04-30'T'00:00:00 1.1442604 2.45578804 -0.39774146 0.133341978
## 20 2007-05-31'T'00:00:00 1.1442604 2.45578804 -0.45209946 0.394241860
## 21 2007-06-30'T'00:00:00 1.1442604 2.45578804 -0.45209946 0.148298473
## 22 2007-07-31'T'00:00:00 1.1442604 2.45578804 -0.34338346 0.084195831
## 23 2007-08-31'T'00:00:00 1.1442604 2.45578804 -0.18030946 0.341409752
## 24 2007-09-30'T'00:00:00 1.1442604 2.15118266 -0.23466746 -0.666984125
## 25 2007-10-31'T'00:00:00 1.1442604 1.99887997 -0.18030946 0.267123461
## 26 2007-11-30'T'00:00:00 1.1442604 1.99887997 0.03712254 0.483248368
## 27 2007-12-31'T'00:00:00 1.1442604 1.84657727 0.09148054 -0.259709059
## 28 2008-01-31'T'00:00:00 1.1442604 1.08506381 0.03712254 0.926721461
## 29 2008-02-29'T'00:00:00 1.1442604 1.08506381 0.25455453 1.104710849
## 30 2008-03-31'T'00:00:00 1.1442604 0.62815574 0.30891253 0.534473775
## 31 2008-04-30'T'00:00:00 1.1442604 0.47585305 0.41762853 1.581333964
## 32 2008-05-31'T'00:00:00 1.1442604 0.47585305 0.85249253 -0.834529956
## 33 2008-06-30'T'00:00:00 1.1442604 0.47585305 2.97245451 -0.989812878
## 34 2008-07-31'T'00:00:00 1.1442604 0.47585305 3.40731850 -0.472289773
## 35 2008-08-31'T'00:00:00 1.1442604 0.47585305 3.40731850 -0.605953116
## 36 2008-09-30'T'00:00:00 1.1442604 0.47585305 3.24424450 -0.862198292
## 37 2008-10-31'T'00:00:00 1.1442604 -0.13335772 2.91809651 -1.482172211
## 38 2008-11-30'T'00:00:00 0.6941963 -0.13335772 1.88529452 -0.971713865
## 39 2008-12-31'T'00:00:00 0.6941963 -0.66641715 1.17864052 -0.360080613
## 40 2009-01-31'T'00:00:00 -0.6559958 -0.66641715 0.90685053 -0.207254998
## 41 2009-02-28'T'00:00:00 -1.5561238 -0.66641715 0.79813453 -0.423072742
## 42 2009-03-31'T'00:00:00 -1.5561238 -0.66641715 0.68941853 -0.496886475
## 43 2009-04-30'T'00:00:00 -1.5561238 -0.66641715 0.41762853 -0.016412003
## 44 2009-05-31'T'00:00:00 -1.5561238 -0.66641715 0.09148054 0.163774784
## 45 2009-06-30'T'00:00:00 -1.5561238 -0.66641715 -1.97412344 -0.374966225
## 46 2009-07-31'T'00:00:00 -1.5561238 -0.66641715 -2.51770344 0.445798059
## 47 2009-08-31'T'00:00:00 -1.5561238 -0.66641715 -2.51770344 0.427202858
## 48 2009-09-30'T'00:00:00 -1.5561238 -0.66641715 -2.30027144 0.157962307
## 49 2009-10-31'T'00:00:00 -1.5561238 -0.66641715 -2.02848144 -0.382361775
## 50 2009-11-30'T'00:00:00 -1.5561238 -0.66641715 -1.26746945 0.212991815
## 51 2009-12-31'T'00:00:00 -1.5561238 -0.66641715 -0.61517346 0.937613949
## 52 2010-01-31'T'00:00:00 -1.5561238 -0.66641715 -0.50645746 0.758325024
## 53 2010-02-28'T'00:00:00 -1.5561238 -0.66641715 -0.56081546 0.280733163
## 54 2010-03-31'T'00:00:00 -1.1060598 -0.66641715 -0.50645746 1.770712026
## 55 2010-04-30'T'00:00:00 -1.1060598 -0.66641715 -0.39774146 0.059764525
## 56 2010-05-31'T'00:00:00 -0.6559958 -0.66641715 -0.34338346 0.134121700
## 57 2010-06-30'T'00:00:00 -0.6559958 -0.66641715 -0.28902546 0.062812531
## 58 2010-07-31'T'00:00:00 -0.2059317 -0.66641715 -0.18030946 0.498913702
## 59 2010-08-31'T'00:00:00 -0.2059317 -0.66641715 -0.07159346 0.047974175
## 60 2010-09-30'T'00:00:00 -0.2059317 -0.66641715 -0.23466746 0.964786097
## 61 2010-10-31'T'00:00:00 -0.2059317 -0.66641715 -0.12595146 0.719338898
## 62 2010-11-30'T'00:00:00 -0.2059317 -0.66641715 -0.12595146 0.151299224
## 63 2010-12-31'T'00:00:00 -0.2059317 -0.66641715 -0.01723546 -0.103433763
## 64 2011-01-31'T'00:00:00 -0.2059317 -0.66641715 0.09148054 0.138374732
## 65 2011-02-28'T'00:00:00 -0.2059317 -0.66641715 0.36327053 0.793885097
## 66 2011-03-31'T'00:00:00 -0.2059317 -0.66641715 0.41762853 0.138964013
## 67 2011-04-30'T'00:00:00 -0.2059317 -0.66641715 0.52634453 0.330767721
## 68 2011-05-31'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.929844605
## 69 2011-06-30'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.684795299
## 70 2011-07-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 0.686301582
## 71 2011-08-31'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.600546281
## 72 2011-09-30'T'00:00:00 0.2441323 -0.66641715 0.63506053 -1.628060895
## 73 2011-10-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 0.272287823
## 74 2011-11-30'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.238665243
## 75 2011-12-31'T'00:00:00 0.2441323 -0.66641715 0.41762853 1.212317519
## 76 2012-01-31'T'00:00:00 0.2441323 -0.66641715 0.25455453 1.238566051
## 77 2012-02-29'T'00:00:00 0.2441323 -0.66641715 -0.01723546 -0.216435404
## 78 2012-03-31'T'00:00:00 0.2441323 -0.66641715 -0.07159346 0.169712489
## 79 2012-04-30'T'00:00:00 0.2441323 -0.66641715 -0.18030946 0.271386180
## 80 2012-05-31'T'00:00:00 0.2441323 -0.66641715 -0.28902546 0.493720278
## 81 2012-06-30'T'00:00:00 0.2441323 -0.66641715 -0.34338346 -0.975457005
## 82 2012-07-31'T'00:00:00 0.2441323 -0.66641715 -0.45209946 1.977007231
## 83 2012-08-31'T'00:00:00 0.2441323 -0.66641715 -0.45209946 -1.281704605
## 84 2012-09-30'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.607297260
## 85 2012-10-31'T'00:00:00 0.2441323 -0.66641715 -0.50645746 1.096759569
## 86 2012-11-30'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.461319263
## 87 2012-12-31'T'00:00:00 0.2441323 -0.66641715 -0.56081546 0.176953985
## 88 2013-01-31'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.394226030
## 89 2013-02-28'T'00:00:00 0.2441323 -0.66641715 -0.39774146 -0.574200689
## 90 2013-03-31'T'00:00:00 0.2441323 -0.66641715 -0.34338346 1.555530346
## 91 2013-04-30'T'00:00:00 0.2441323 -0.66641715 -0.28902546 1.434794330
## 92 2013-05-31'T'00:00:00 0.2441323 -0.66641715 -0.23466746 -0.309202537
## 93 2013-06-30'T'00:00:00 0.2441323 -0.66641715 -0.23466746 -1.767359033
## 94 2013-07-31'T'00:00:00 0.2441323 -0.66641715 -0.12595146 -3.115306003
## 95 2013-08-31'T'00:00:00 0.2441323 -0.66641715 -0.18030946 -0.208107259
## 96 2013-09-30'T'00:00:00 0.2441323 -0.66641715 0.20019653 0.417006686
## 97 2013-10-31'T'00:00:00 0.2441323 -0.66641715 0.30891253 2.224052862
## 98 2013-11-30'T'00:00:00 0.2441323 -0.66641715 0.36327053 -0.767345283
## 99 2013-12-31'T'00:00:00 0.2441323 -0.66641715 0.52634453 0.066853148
## 100 2014-01-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 -0.005555194
## 101 2014-02-28'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.149779237
## 102 2014-03-31'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.129359958
## 103 2014-04-30'T'00:00:00 0.2441323 -0.66641715 0.63506053 -1.442095182
## 104 2014-05-31'T'00:00:00 0.2441323 -0.66641715 0.52634453 1.971095280
## 105 2014-06-30'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.403389423
## 106 2014-07-31'T'00:00:00 0.6941963 -0.66641715 0.52634453 1.390059286
## 107 2014-08-31'T'00:00:00 0.6941963 -0.66641715 0.58070253 -1.542792094
## 108 2014-09-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 0.150721284
## 109 2014-10-31'T'00:00:00 0.6941963 -0.66641715 0.30891253 -0.926083321
## 110 2014-11-30'T'00:00:00 0.6941963 -0.66641715 0.41762853 -0.548830172
## 111 2014-12-31'T'00:00:00 0.6941963 -0.66641715 0.25455453 -0.188979720
## 112 2015-01-31'T'00:00:00 0.6941963 -0.66641715 -0.66953146 0.126651958
## 113 2015-02-28'T'00:00:00 0.6941963 -0.66641715 -1.15875345 -0.435980694
## 114 2015-03-31'T'00:00:00 0.6941963 -0.66641715 -0.72388946 1.154184479
## 115 2015-04-30'T'00:00:00 0.6941963 -0.66641715 -0.23466746 1.250073338
## 116 2015-05-31'T'00:00:00 0.6941963 -0.66641715 -0.07159346 -0.058903573
## 117 2015-06-30'T'00:00:00 0.6941963 -0.66641715 0.14583854 1.842324814
## 118 2015-07-31'T'00:00:00 0.6941963 -0.66641715 0.58070253 -0.522100102
## 119 2015-08-31'T'00:00:00 0.6941963 -0.66641715 0.47198653 -2.092402907
## 120 2015-09-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 -1.062121510
## 121 2015-10-31'T'00:00:00 0.6941963 -0.66641715 0.14583854 -0.168612895
## 122 2015-11-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 0.990550729
## 123 2015-12-31'T'00:00:00 0.6941963 -0.51411445 0.25455453 0.554653467
## 124 2016-01-31'T'00:00:00 0.6941963 -0.51411445 0.68941853 0.332397341
## 125 2016-02-29'T'00:00:00 0.6941963 -0.51411445 1.06992453 -0.063436124
## 126 2016-03-31'T'00:00:00 0.6941963 -0.51411445 0.20019653 1.349118891
## 127 2016-04-30'T'00:00:00 0.6941963 -0.51411445 -0.07159346 0.722707299
## 128 2016-05-31'T'00:00:00 0.6941963 -0.51411445 -0.12595146 0.183697876
## 129 2016-06-30'T'00:00:00 0.6941963 -0.51411445 -0.34338346 0.982701049
## 130 2016-07-31'T'00:00:00 0.2441323 -0.51411445 -0.61517346 0.565706388
## 131 2016-08-31'T'00:00:00 0.2441323 -0.51411445 -0.39774146 0.186023576
## 132 2016-09-30'T'00:00:00 0.2441323 -0.51411445 -0.39774146 -1.506002422
## 133 2016-10-31'T'00:00:00 0.2441323 -0.51411445 -0.45209946 0.545930262
## 134 2016-11-30'T'00:00:00 0.2441323 -0.51411445 -0.28902546 -2.927990425
## 135 2016-12-31'T'00:00:00 0.2441323 -0.36181176 -0.28902546 -1.273418281
## 136 2017-01-31'T'00:00:00 0.2441323 -0.36181176 0.47198653 -0.695023183
## 137 2017-02-28'T'00:00:00 0.2441323 -0.36181176 1.23299852 -1.959283480
## 138 2017-03-31'T'00:00:00 0.2441323 -0.20950907 1.45043052 -5.644462424
## 139 2017-04-30'T'00:00:00 0.2441323 -0.20950907 1.12428253 1.151532950
## 140 2017-05-31'T'00:00:00 0.2441323 -0.20950907 0.85249253 1.905604022
## 141 2017-06-30'T'00:00:00 0.2441323 -0.05720638 0.63506053 -0.413334953
## 142 2017-07-31'T'00:00:00 0.2441323 -0.05720638 0.47198653 -0.376057837
## 143 2017-08-31'T'00:00:00 0.2441323 -0.05720638 0.74377653 0.292191540
## 144 2017-09-30'T'00:00:00 0.2441323 -0.05720638 1.06992453 1.159095786
## 145 2017-10-31'T'00:00:00 0.2441323 -0.05720638 0.79813453 -1.025482349
## 146 2017-11-30'T'00:00:00 0.2441323 -0.05720638 0.63506053 1.476469790
## 147 2017-12-31'T'00:00:00 0.2441323 0.09509632 0.68941853 0.774778114
## 148 2018-01-31'T'00:00:00 0.6941963 0.09509632 0.25455453 0.786075585
## 149 2018-02-28'T'00:00:00 0.6941963 0.09509632 -0.45209946 -0.940045080
## 150 2018-03-31'T'00:00:00 0.6941963 0.24739901 -0.50645746 -0.095497841
## 151 2018-04-30'T'00:00:00 0.6941963 0.24739901 -0.45209946 -0.937707094
## 152 2018-05-31'T'00:00:00 0.6941963 0.24739901 -0.23466746 -1.583064762
## 153 2018-06-30'T'00:00:00 0.6941963 0.39970170 -0.77824746 -1.619272950
## 154 2018-07-31'T'00:00:00 0.6941963 0.39970170 -0.72388946 0.628538792
## 155 2018-08-31'T'00:00:00 0.6941963 0.39970170 -1.10439545 -0.331551039
## 156 2018-09-30'T'00:00:00 0.6941963 0.55200439 -1.05003745 -1.526002069
## 157 2018-10-31'T'00:00:00 0.6941963 0.55200439 -0.88696345 0.913065448
## 158 2018-11-30'T'00:00:00 0.6941963 0.55200439 -1.10439545 -1.467854852
## 159 2018-12-31'T'00:00:00 0.6941963 0.70430708 -1.10439545 -0.546706018
## 160 2019-01-31'T'00:00:00 0.6941963 0.70430708 -1.59361745 -0.610706825
## 161 2019-02-28'T'00:00:00 0.6941963 0.70430708 -1.43054345 0.947783657
## 162 2019-03-31'T'00:00:00 0.6941963 0.70430708 -1.10439545 0.128165329
## 163 2019-04-30'T'00:00:00 0.6941963 0.70430708 -1.10439545 -1.037539931
## 164 2019-05-31'T'00:00:00 0.2441323 0.70430708 -1.10439545 -1.089133934
## 165 2019-06-30'T'00:00:00 0.2441323 0.70430708 -0.39774146 1.164851320
## 166 2019-07-31'T'00:00:00 0.2441323 0.55200439 -0.45209946 1.117312110
## 167 2019-08-31'T'00:00:00 0.2441323 0.55200439 -0.39774146 -0.427681139
## 168 2019-09-30'T'00:00:00 0.2441323 0.39970170 -0.61517346 -0.090673013
## 169 2019-10-31'T'00:00:00 0.2441323 0.24739901 -0.61517346 -0.305399145
## 170 2019-11-30'T'00:00:00 0.2441323 0.24739901 -0.72388946 0.902733416
## 171 2019-12-31'T'00:00:00 0.2441323 0.24739901 -0.66953146 1.091568271
## 172 2020-01-31'T'00:00:00 -0.2059317 0.24739901 -0.34338346 0.590563706
## 173 2020-02-29'T'00:00:00 -0.2059317 0.24739901 -0.50645746 -1.882020066
## 174 2020-03-31'T'00:00:00 -0.6559958 -0.66641715 -1.32182745 -3.145285862
## 175 2020-04-30'T'00:00:00 -0.6559958 -0.66641715 -2.78949344 -0.304330925
## 176 2020-05-31'T'00:00:00 -1.5561238 -0.66641715 -2.78949344 0.248537475
## 177 2020-06-30'T'00:00:00 -1.5561238 -0.66641715 -2.24591344 1.644272930
## 178 2020-07-31'T'00:00:00 -2.0061879 -0.66641715 -1.91976544 1.613812242
## 179 2020-08-31'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.559941876
## 180 2020-09-30'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.136886644
## 181 2020-10-31'T'00:00:00 -2.0061879 -0.66641715 -2.02848144 0.732547397
## 182 2020-11-30'T'00:00:00 -2.0061879 -0.66641715 -2.13719744 0.224184378
## 183 2020-12-31'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.357819840
## 184 2021-01-31'T'00:00:00 -2.0061879 -0.66641715 -1.32182745 0.332006771
## 185 2021-02-28'T'00:00:00 -2.0061879 -0.66641715 -1.15875345 0.630543624
## 186 2021-03-31'T'00:00:00 -2.0061879 -0.66641715 -0.28902546 0.155984884
## 187 2021-04-30'T'00:00:00 -2.0061879 -0.66641715 1.34171452 0.918493971
## 188 2021-05-31'T'00:00:00 -2.0061879 -0.66641715 1.17864052 0.357659170
## 189 2021-06-30'T'00:00:00 -2.0061879 -0.66641715 0.63506053 -0.095975598
## 190 2021-07-31'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -1.045728435
## 191 2021-08-31'T'00:00:00 -2.0061879 -0.66641715 -0.12595146 0.540506465
## 192 2021-09-30'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -0.764365798
## 193 2021-10-31'T'00:00:00 -2.0061879 -0.66641715 0.36327053 0.428190034
## 194 2021-11-30'T'00:00:00 -2.0061879 -0.66641715 0.58070253 -1.351534428
## 195 2021-12-31'T'00:00:00 -2.0061879 -0.66641715 0.52634453 0.364322489
## 196 2022-01-31'T'00:00:00 -2.0061879 -0.66641715 0.03712254 0.886263077
## 197 2022-02-28'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -0.083081823
## 198 2022-03-31'T'00:00:00 -2.0061879 -0.51411445 -0.01723546 -0.954116472
## 199 2022-04-30'T'00:00:00 -2.0061879 -0.51411445 0.03712254 -0.700446508
## 200 2022-05-31'T'00:00:00 -1.5561238 -0.20950907 0.30891253 -0.073537074
## 201 2022-06-30'T'00:00:00 -1.5561238 0.24739901 0.63506053 -0.404043259
## 202 2022-07-31'T'00:00:00 -1.1060598 0.70430708 1.17864052 -0.972350402
## 203 2022-08-31'T'00:00:00 -1.1060598 0.70430708 1.34171452 0.615444415
## 204 2022-09-30'T'00:00:00 -0.6559958 1.16121516 1.23299852 -0.808601819
## 205 2022-10-31'T'00:00:00 -0.6559958 1.16121516 1.23299852 -0.808601819
## mfr bco metb uscpi mgdpqa
## 1 -1.778702505 -0.765925056 -0.003279066 0.947964474 0.089478283
## 2 -2.010727355 -0.887842622 -0.276476120 0.546864954 0.089478283
## 3 -2.159803322 -0.730748840 -0.156053734 0.496727515 0.089478283
## 4 -2.113978414 -0.450538301 -0.289057563 0.797552154 0.089478283
## 5 -2.061192760 -0.619623975 -0.531699683 0.597002394 0.065717858
## 6 -1.974183441 -0.453736138 -0.130890848 0.496727515 0.327082532
## 7 -1.856430830 -0.190314248 -0.621567135 0.546864954 0.327082532
## 8 -1.685892564 -0.273857761 -0.416669345 0.897827034 0.327082532
## 9 -1.680091943 -0.149941546 -0.378925015 0.947964474 0.303322107
## 10 -1.662110017 -0.084385870 -0.217163602 0.847689594 0.303322107
## 11 -1.648768588 -0.280253437 -0.057199537 0.697277274 0.303322107
## 12 -1.634847097 -0.590843435 -0.010468462 -0.155059204 0.327082532
## 13 -1.629626538 -0.728750191 -0.161445781 -0.556158724 0.327082532
## 14 -1.606424053 -0.519691543 -0.242326488 -0.205196644 0.327082532
## 15 -1.466629081 -0.655599651 0.081196339 0.045490555 0.255801257
## 16 -1.404562433 -0.793906136 -0.538889080 -0.155059204 0.255801257
## 17 -1.208501434 -0.614427489 -0.693461097 -0.004646885 0.255801257
## 18 -1.112211121 -0.366195328 -0.754570964 0.195902875 0.208280407
## 19 -0.938192483 -0.384183166 -0.876790699 0.095627995 0.208280407
## 20 -0.543170175 -0.368593706 -0.450818977 0.145765435 0.208280407
## 21 -0.541429989 -0.233884788 -0.326801893 0.145765435 0.374603382
## 22 -0.537369554 -0.008437222 -0.484968608 -0.004646885 0.374603382
## 23 -0.634819991 -0.182719383 -0.245921186 -0.205196644 0.374603382
## 24 -0.551291045 0.076305480 0.171063791 0.195902875 0.493405506
## 25 -0.469502285 0.534395748 -0.224352998 0.546864954 0.493405506
## 26 -0.384233153 0.439659802 -0.023049905 0.947964474 0.493405506
## 27 -0.370311662 0.663108720 -0.116512055 0.847689594 0.778530605
## 28 0.089097543 0.597553045 -0.120106754 0.947964474 0.778530605
## 29 0.495721093 0.912939800 -0.229745045 0.797552154 0.778530605
## 30 0.728326006 0.920934394 -0.440034882 0.797552154 0.778530605
## 31 0.948749614 1.363035473 0.336419902 0.747414714 0.778530605
## 32 1.012556448 2.019391685 0.922355689 0.897827034 0.778530605
## 33 1.046780113 2.501066007 0.485599872 1.298926553 0.540926356
## 34 1.005595703 1.867494389 0.737228738 1.599751193 0.540926356
## 35 0.861160233 1.470562769 0.446058194 1.499476313 0.540926356
## 36 0.116360463 0.835791962 0.859448472 1.248789113 0.184519983
## 37 -0.436438744 -0.477320192 -0.274678771 0.647139834 0.184519983
## 38 -0.582614400 -0.950200460 0.082993688 -0.656433604 0.184519983
## 39 -0.949793726 -1.265986945 -0.010468462 -1.157808003 -0.955980412
## 40 -0.950953850 -1.254394782 -0.666500861 -1.207945443 -0.955980412
## 41 -0.964295279 -1.235607485 0.081196339 -1.107670563 -0.955980412
## 42 -1.155135719 -1.120485324 0.174658489 -1.408495202 -2.405366330
## 43 -1.160356278 -1.057727757 -0.569444013 -1.558907522 -2.405366330
## 44 -1.126132612 -0.469325598 -0.096741216 -1.859732162 -2.405366330
## 45 -0.939352608 -0.318227761 -0.224352998 -1.909869602 -1.906397408
## 46 -0.961394968 -0.222292626 -0.416669345 -2.260831681 -1.906397408
## 47 -0.835521487 -0.304237220 -0.107525310 -1.960007042 -1.906397408
## 48 -0.683545210 -0.327421545 -0.147066989 -1.859732162 -1.288626361
## 49 -0.678324651 -0.082387222 0.223186913 -1.308220323 -1.288626361
## 50 -0.673104092 0.048324399 -0.299841657 -0.305471524 -1.288626361
## 51 -0.639460488 0.026738994 0.284296780 0.145765435 0.041957433
## 52 -0.624958935 -0.231886140 0.438868797 0.095627995 0.041957433
## 53 -0.631339618 0.013148183 0.162077045 -0.155059204 0.041957433
## 54 -0.721829310 0.217410074 0.670726823 -0.054784325 1.420062077
## 55 -0.680644899 0.406881965 -0.260299979 -0.104921765 1.420062077
## 56 -0.711388192 -0.104372357 -0.438237533 -0.205196644 1.420062077
## 57 -0.751992541 -0.089982086 -0.826464926 -0.656433604 1.206218253
## 58 -0.737490988 0.036732237 -0.664703512 -0.606296164 1.206218253
## 59 -0.724149559 -0.104772086 -0.425656090 -0.656433604 1.206218253
## 60 -0.406855576 0.201820615 -0.679082305 -0.656433604 0.279561682
## 61 -0.141187122 0.235397912 -0.693461097 -0.606296164 0.279561682
## 62 -0.112184015 0.346123046 -0.305233705 -0.656433604 0.279561682
## 63 -0.071579666 0.699084395 -0.152459036 -0.455883844 0.160759558
## 64 0.022390398 0.949315205 -0.116512055 -0.405746404 0.160759558
## 65 0.119840835 1.380623581 -0.035631349 -0.155059204 0.160759558
## 66 0.354185934 1.602873309 0.126130065 0.145765435 0.160759558
## 67 1.290986269 1.943842767 0.066817546 0.396452635 0.160759558
## 68 1.451083416 1.577690336 -0.386114411 0.597002394 0.160759558
## 69 1.542733232 1.407805202 -0.493955354 0.597002394 0.065717858
## 70 1.556654723 1.578090066 -0.213568904 0.597002394 0.065717858
## 71 1.655845346 1.502541147 0.061425499 0.697277274 0.065717858
## 72 1.348412419 1.019267907 -0.181216621 0.747414714 0.398363807
## 73 1.568836027 1.291084122 0.478410476 0.546864954 0.398363807
## 74 1.568836027 1.329458176 -0.206379507 0.496727515 0.398363807
## 75 1.502708945 1.203943041 -0.418466694 0.296177755 0.279561682
## 76 1.528231678 1.347845743 -0.339383336 0.246040315 0.279561682
## 77 1.564195530 1.814730065 -0.010468462 0.246040315 0.279561682
## 78 1.622201743 1.823524119 -0.033834000 0.145765435 0.184519983
## 79 1.633802986 1.687216282 -0.562254617 -0.054784325 0.184519983
## 80 1.639603607 0.983691961 -1.085283187 -0.355608964 0.184519983
## 81 1.535192424 0.821001962 -0.258502630 -0.355608964 0.208280407
## 82 1.552594288 1.105609528 -1.263220742 -0.506021284 0.208280407
## 83 1.575796773 1.491348715 -0.637743277 -0.355608964 0.208280407
## 84 1.726612926 1.404207635 -0.749178917 -0.205196644 0.160759558
## 85 1.773017896 1.256707365 -0.190203366 -0.104921765 0.160759558
## 86 1.819422866 1.357838986 -0.341180685 -0.305471524 0.160759558
## 87 1.854226594 1.353042229 -0.431048137 -0.355608964 0.517165931
## 88 1.883229700 1.530522228 -1.324330609 -0.405746404 0.517165931
## 89 1.889030321 1.363834932 -0.436440184 -0.205196644 0.517165931
## 90 1.854226594 1.309471689 -1.034957414 -0.455883844 -0.005563417
## 91 1.889030321 1.003678448 -1.725139445 -0.656433604 -0.005563417
## 92 1.952837155 0.924531962 -1.394427222 -0.506021284 -0.005563417
## 93 1.645404228 0.995284123 -1.135608960 -0.305471524 0.065717858
## 94 1.744014790 1.216734392 -1.398021920 -0.205196644 0.065717858
## 95 1.569996152 1.468963850 -0.634148579 -0.455883844 0.065717858
## 96 1.668606713 1.243516284 -0.355559478 -0.606296164 0.136999133
## 97 1.703410441 1.262303581 -0.432845486 -0.706571044 0.136999133
## 98 1.657005471 1.296280608 -0.165040480 -0.606296164 0.136999133
## 99 1.575796773 1.340650608 -0.188406017 -0.455883844 0.160759558
## 100 1.471385590 1.164769528 -0.768949756 -0.405746404 0.160759558
## 101 1.326370058 1.271497365 -0.035631349 -0.656433604 0.160759558
## 102 1.303167573 1.219132771 -0.199190111 -0.455883844 0.469645081
## 103 1.361173786 1.231524392 -0.341180685 -0.205196644 0.469645081
## 104 1.343771922 1.285088176 -0.896561538 -0.155059204 0.469645081
## 105 1.401778135 1.403008445 -1.175150639 -0.155059204 0.517165931
## 106 1.395977514 1.149579798 -1.257828695 -0.205196644 0.517165931
## 107 1.407578756 1.036456285 -1.218287016 -0.355608964 0.517165931
## 108 1.134949557 0.695886558 -0.235137092 -0.355608964 0.303322107
## 109 1.181354527 0.343724668 -1.705368606 -0.355608964 0.303322107
## 110 1.042139616 -0.284250734 0.088385735 -0.556158724 0.303322107
## 111 0.479479354 -0.796704245 -0.260299979 -0.806845923 0.327082532
## 112 0.166245805 -0.970186946 -0.292652261 -1.258082883 0.327082532
## 113 0.160445184 -0.586846138 -1.092472583 -1.207945443 0.327082532
## 114 -0.152788364 -0.885444244 -0.506536797 -1.258082883 0.374603382
## 115 -0.112184015 -0.418959652 -0.673690257 -1.308220323 0.374603382
## 116 -0.077380288 -0.467726679 -0.921724425 -1.207945443 0.374603382
## 117 -0.129585879 -0.546473435 -0.477779212 -1.157808003 0.160759558
## 118 -0.640040550 -1.001365865 -1.484294674 -1.107670563 0.160759558
## 119 -0.756052976 -0.923818298 -0.080565075 -1.107670563 0.160759558
## 120 -0.837261673 -1.154862080 -0.170432527 -1.207945443 0.113238708
## 121 -0.796657325 -1.107294243 0.273512686 -1.107670563 0.113238708
## 122 -0.761853597 -1.305160458 -0.071578330 -0.957258243 0.113238708
## 123 -0.721249248 -1.598162348 -0.475981863 -0.856983363 0.089478283
## 124 -0.709648006 -1.699693699 -0.943292613 -0.506021284 0.089478283
## 125 -0.703847384 -1.650526942 -0.591012202 -0.706571044 0.089478283
## 126 -0.622638687 -1.505425051 0.099169829 -0.756708483 -0.005563417
## 127 -0.622638687 -1.164455594 -0.283665516 -0.656433604 -0.005563417
## 128 -0.605236823 -1.102097756 -1.322533260 -0.706571044 -0.005563417
## 129 -0.611037444 -1.102497486 -0.919927076 -0.706571044 -0.029323841
## 130 -0.605236823 -1.391102349 -1.568770079 -0.806845923 -0.029323841
## 131 -0.593635580 -1.208026134 -0.382519713 -0.656433604 -0.029323841
## 132 -0.582034338 -1.127280729 -0.553267872 -0.455883844 0.041957433
## 133 -0.576233716 -1.157660188 -0.157851083 -0.405746404 0.041957433
## 134 -0.657442414 -1.070918838 -0.289057563 -0.355608964 0.041957433
## 135 -0.761853597 -0.817090461 -0.344775383 -0.155059204 0.113238708
## 136 -0.738651112 -0.861860190 -1.065512348 0.045490555 0.113238708
## 137 -0.738651112 -0.866257217 -0.346572732 0.145765435 0.113238708
## 138 -0.715448627 -0.976582622 -0.939697915 -0.004646885 0.303322107
## 139 -0.674844278 -1.020552892 -0.355559478 -0.104921765 0.303322107
## 140 -0.564632474 -1.077314513 -0.919927076 -0.255334084 0.303322107
## 141 -0.512426883 -1.172849918 -0.134485546 -0.405746404 0.327082532
## 142 -0.483423776 -0.983777757 -0.466995118 -0.355608964 0.327082532
## 143 -0.419616942 -0.994570460 -0.112917357 -0.255334084 0.327082532
## 144 -0.379012593 -0.788309920 -0.366343572 -0.104921765 0.422124231
## 145 -0.361610730 -0.635213435 -0.035631349 -0.205196644 0.422124231
## 146 -0.338408245 -0.547272895 -0.123701452 -0.104921765 0.422124231
## 147 -0.309405138 -0.415362085 -0.608985692 -0.155059204 0.350842957
## 148 -0.233997062 -0.328221004 -0.174027225 -0.155059204 0.350842957
## 149 -0.233997062 -0.458932625 -0.290854912 -0.104921765 0.350842957
## 150 0.003828410 -0.279453977 0.728241993 -0.004646885 0.232040832
## 151 0.102438972 -0.083586411 0.437071448 0.045490555 0.232040832
## 152 0.044432759 0.013148183 -0.452616326 0.195902875 0.232040832
## 153 -0.175990849 0.087098183 -0.833654322 0.246040315 0.113238708
## 154 -0.187592092 -0.120361546 -0.414871996 0.246040315 0.113238708
## 155 -0.193392713 0.006352778 -1.622690550 0.145765435 0.113238708
## 156 -0.274601411 0.218209533 0.825298841 -0.054784325 0.041957433
## 157 -0.350009487 -0.071594519 1.019412537 0.045490555 0.041957433
## 158 -0.332607623 -0.741541542 -0.502942099 -0.104921765 0.041957433
## 159 -0.367411351 -0.937808838 0.007505028 -0.255334084 0.113238708
## 160 -0.326807002 -0.614427489 0.156684998 -0.405746404 0.113238708
## 161 -0.309405138 -0.448939382 0.075804292 -0.455883844 0.113238708
## 162 -0.274601411 -0.354603166 0.672524172 -0.255334084 0.089478283
## 163 -0.251398926 -0.178322356 0.030870566 -0.205196644 0.089478283
## 164 -0.315205760 -0.510497760 -0.280070818 -0.305471524 0.089478283
## 165 -0.292003274 -0.428153436 -0.023049905 -0.405746404 0.136999133
## 166 -0.222395819 -0.483316138 0.654550682 -0.305471524 0.136999133
## 167 -0.245598304 -0.672788029 0.047046707 -0.355608964 0.136999133
## 168 -0.274601411 -0.658797489 -0.411277298 -0.355608964 0.041957433
## 169 -0.263000168 -0.680782624 1.202742139 -0.305471524 0.041957433
## 170 -0.263000168 -0.592842084 -0.724016031 -0.155059204 0.041957433
## 171 -0.239797683 -0.450138571 0.334622553 -0.054784325 -0.171886391
## 172 -0.204993956 -0.763526677 0.250147148 0.045490555 -0.171886391
## 173 -0.251398926 -1.068920189 0.356190742 -0.054784325 -0.171886391
## 174 -0.350009487 -2.179369372 0.300472921 -0.455883844 -0.860938713
## 175 -0.303604517 -2.078237751 -2.564501446 -1.057533123 -0.860938713
## 176 -0.280402032 -1.676109645 -0.044618094 -1.157808003 -0.860938713
## 177 -0.251398926 -1.443466943 1.835409000 -0.907120803 -5.090294343
## 178 -0.204993956 -1.357525052 2.613661134 -0.706571044 -5.090294343
## 179 -0.193392713 -1.278378566 0.464031684 -0.556158724 -5.090294343
## 180 -0.158588985 -1.451461538 2.033117395 -0.506021284 -1.621272309
## 181 -0.181791470 -1.590967213 2.065469677 -0.606296164 -1.621272309
## 182 -0.141187122 -1.186040999 1.152416366 -0.606296164 -1.621272309
## 183 -0.007772832 -1.017754784 1.806651416 -0.506021284 -1.811355708
## 184 0.050233380 -0.854665055 1.071535659 -0.506021284 -1.811355708
## 185 0.073435865 -0.444942084 1.305191034 -0.355608964 -1.811355708
## 186 0.050233380 -0.548472084 2.428534183 0.095627995 -1.146063811
## 187 0.177847048 -0.400172355 1.747338898 0.897827034 -1.146063811
## 188 0.183647669 -0.317428301 0.559291183 1.298926553 -1.146063811
## 189 0.195248912 -0.085185330 2.088835215 1.499476313 2.750645870
## 190 0.195248912 -0.037217762 0.561088532 1.499476313 2.750645870
## 191 0.496881218 -0.170727491 2.784409293 1.449338873 2.750645870
## 192 0.433074384 0.050323048 2.779017246 1.499476313 -2.096480807
## 193 0.485279975 0.284564668 2.814964226 1.900575832 -2.096480807
## 194 0.520083703 -0.267462085 1.492115334 2.201400472 -2.096480807
## 195 0.531684945 0.020743048 3.657920926 2.301675352 -0.171886391
## 196 0.485279975 0.557580072 1.431005467 2.552362551 -0.171886391
## 197 0.467878111 0.948515745 1.648484700 2.752912311 -0.171886391
## 198 0.456276869 1.225128717 2.868884698 3.053736951 0.160759558
## 199 0.276457609 1.282290068 2.308111798 2.953462071 0.160759558
## 200 0.293859473 1.821925200 0.370569534 3.103874390 0.160759558
## 201 0.073435865 1.500942229 2.016941253 3.354561590 1.087416128
## 202 0.085037108 1.309071959 0.890003406 3.053736951 1.087416128
## 203 0.027030895 0.768637368 1.150619017 2.953462071 1.087416128
## 204 -0.094782151 0.427667911 3.787330056 2.903324631 1.087416128
## 205 -0.187592092 0.702282233 3.787330056 2.903324631 1.087416128
## myrer
## 1 0.158220697
## 2 0.163543850
## 3 0.167802371
## 4 0.106053807
## 5 0.030465048
## 6 -0.037458372
## 7 -0.161168425
## 8 -0.148392860
## 9 -0.055770015
## 10 -0.092393301
## 11 -0.041929820
## 12 -0.027024994
## 13 -0.099206936
## 14 -0.180331773
## 15 -0.369835986
## 16 -0.428603584
## 17 -0.422002876
## 18 -0.516542056
## 19 -0.593195446
## 20 -0.645362336
## 21 -0.524207395
## 22 -0.524207395
## 23 -0.424132137
## 24 -0.621088762
## 25 -0.769285315
## 26 -0.728616434
## 27 -0.828691692
## 28 -0.990515515
## 29 -1.078028134
## 30 -1.080157395
## 31 -1.151913485
## 32 -0.978804580
## 33 -0.924508429
## 34 -0.948994929
## 35 -0.653027675
## 36 -0.560404829
## 37 -0.324056878
## 38 -0.164362317
## 39 -0.496527004
## 40 -0.199495120
## 41 0.007894884
## 42 -0.113260057
## 43 -0.301486713
## 44 -0.439036962
## 45 -0.386657146
## 46 -0.379417659
## 47 -0.381546920
## 48 -0.509302569
## 49 -0.613636350
## 50 -0.656221566
## 51 -0.583826698
## 52 -0.619385354
## 53 -0.634290179
## 54 -0.930257433
## 55 -1.100598299
## 56 -0.935154733
## 57 -0.988386254
## 58 -1.104430968
## 59 -1.173631945
## 60 -1.306071968
## 61 -1.254543856
## 62 -1.136369881
## 63 -1.314163159
## 64 -1.362071527
## 65 -1.389751918
## 66 -1.437660287
## 67 -1.574997609
## 68 -1.462146786
## 69 -1.450435851
## 70 -1.560092784
## 71 -1.552001593
## 72 -1.089526143
## 73 -1.352489854
## 74 -1.109754120
## 75 -1.133814768
## 76 -1.406360153
## 77 -1.503667372
## 78 -1.356748375
## 79 -1.432337135
## 80 -1.117206533
## 81 -1.110818751
## 82 -1.214087901
## 83 -1.226863465
## 84 -1.367394680
## 85 -1.386558027
## 86 -1.407637709
## 87 -1.367394680
## 88 -1.266680643
## 89 -1.299258333
## 90 -1.292231773
## 91 -1.401462853
## 92 -1.288612029
## 93 -1.150210076
## 94 -0.972416798
## 95 -0.885755882
## 96 -0.939413255
## 97 -1.160430528
## 98 -1.017131275
## 99 -0.905345082
## 100 -0.753102933
## 101 -0.902151191
## 102 -0.926637690
## 103 -0.926637690
## 104 -1.038423883
## 105 -1.042682405
## 106 -1.075260095
## 107 -1.168308793
## 108 -0.894698778
## 109 -0.875535430
## 110 -0.676875396
## 111 -0.434778441
## 112 -0.152012604
## 113 -0.205457050
## 114 0.005978549
## 115 -0.296376487
## 116 -0.070674841
## 117 0.153962176
## 118 0.264683738
## 119 1.052510242
## 120 1.479427036
## 121 1.273314589
## 122 1.199429238
## 123 1.260113171
## 124 0.964571770
## 125 1.069544328
## 126 0.423313670
## 127 0.433959974
## 128 0.910914397
## 129 0.704376098
## 130 0.788056048
## 131 0.744832053
## 132 0.926245075
## 133 1.050380981
## 134 1.629965776
## 135 1.672550992
## 136 1.549692643
## 137 1.575243773
## 138 1.543304860
## 139 1.363382321
## 140 1.236265450
## 141 1.261816580
## 142 1.236265450
## 143 1.214334064
## 144 1.106806392
## 145 1.131292892
## 146 0.831067116
## 147 0.736315010
## 148 0.421184409
## 149 0.460575734
## 150 0.346660280
## 151 0.474415929
## 152 0.594293313
## 153 0.719280923
## 154 0.776132187
## 155 0.869393811
## 156 0.931781153
## 157 1.029514225
## 158 1.029514225
## 159 0.921560701
## 160 0.840222938
## 161 0.777409744
## 162 0.811903769
## 163 0.924115814
## 164 1.041863938
## 165 0.918366810
## 166 0.906655875
## 167 1.074867480
## 168 1.036966638
## 169 1.016738660
## 170 1.015886956
## 171 0.831067116
## 172 0.845971942
## 173 1.095095458
## 174 1.321222957
## 175 1.280767001
## 176 1.375093256
## 177 1.246911754
## 178 1.146836496
## 179 0.986503156
## 180 0.970533700
## 181 0.969043217
## 182 0.794443830
## 183 0.680528376
## 184 0.722474815
## 185 0.743341571
## 186 0.946047201
## 187 0.824679334
## 188 0.903887836
## 189 0.954564244
## 190 1.106806392
## 191 0.967765661
## 192 1.033772746
## 193 0.936039675
## 194 1.071247737
## 195 0.990761678
## 196 1.032282264
## 197 1.061666063
## 198 1.070608959
## 199 1.390636860
## 200 1.440035711
## 201 1.507107427
## 202 1.597175159
## 203 1.650832532
## 204 1.994708154
## 205 2.184638219
Finding out outliers using the Z-score
outliers_z <- data_z %>%
mutate(outlier=ifelse(abs(mpr)>3 | abs(upr)>3 | abs(mcpi)>3 | abs(mnfbf)>3 | abs(mfr)>3 | abs(bco)>3 | abs(metb)>3 | abs(uscpi)>3 | abs(mgdpqa)>3 | abs(myrer)>3, 1, 0))
outliers_z
## moed mpr upr mcpi mnfbf
## 1 2005-10-31'T'00:00:00 -0.2959445 1.54197189 0.58070253 -0.556877853
## 2 2005-11-30'T'00:00:00 0.2441323 1.69427458 0.68941853 -0.460995610
## 3 2005-12-31'T'00:00:00 0.2441323 1.84657727 0.68941853 -0.183248996
## 4 2006-01-31'T'00:00:00 0.2441323 1.99887997 0.52634453 -0.219919582
## 5 2006-02-28'T'00:00:00 0.6941963 1.99887997 0.52634453 0.130412111
## 6 2006-03-31'T'00:00:00 0.6941963 2.15118266 1.39607252 -0.240215996
## 7 2006-04-30'T'00:00:00 1.1442604 2.15118266 1.28735652 0.113612635
## 8 2006-05-31'T'00:00:00 1.1442604 2.30348535 0.90685053 -0.070874440
## 9 2006-06-30'T'00:00:00 1.1442604 2.45578804 0.90685053 -0.111372756
## 10 2006-07-31'T'00:00:00 1.1442604 2.45578804 1.01556653 0.035215079
## 11 2006-08-31'T'00:00:00 1.1442604 2.45578804 0.58070253 0.246850675
## 12 2006-09-30'T'00:00:00 1.1442604 2.45578804 0.58070253 -0.173726930
## 13 2006-10-31'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.225897455
## 14 2006-11-30'T'00:00:00 1.1442604 2.45578804 0.41762853 -0.233174865
## 15 2006-12-31'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.072292117
## 16 2007-01-31'T'00:00:00 1.1442604 2.45578804 0.52634453 0.085448112
## 17 2007-02-28'T'00:00:00 1.1442604 2.45578804 0.47198653 -0.485096125
## 18 2007-03-31'T'00:00:00 1.1442604 2.45578804 -0.39774146 0.492935830
## 19 2007-04-30'T'00:00:00 1.1442604 2.45578804 -0.39774146 0.133341978
## 20 2007-05-31'T'00:00:00 1.1442604 2.45578804 -0.45209946 0.394241860
## 21 2007-06-30'T'00:00:00 1.1442604 2.45578804 -0.45209946 0.148298473
## 22 2007-07-31'T'00:00:00 1.1442604 2.45578804 -0.34338346 0.084195831
## 23 2007-08-31'T'00:00:00 1.1442604 2.45578804 -0.18030946 0.341409752
## 24 2007-09-30'T'00:00:00 1.1442604 2.15118266 -0.23466746 -0.666984125
## 25 2007-10-31'T'00:00:00 1.1442604 1.99887997 -0.18030946 0.267123461
## 26 2007-11-30'T'00:00:00 1.1442604 1.99887997 0.03712254 0.483248368
## 27 2007-12-31'T'00:00:00 1.1442604 1.84657727 0.09148054 -0.259709059
## 28 2008-01-31'T'00:00:00 1.1442604 1.08506381 0.03712254 0.926721461
## 29 2008-02-29'T'00:00:00 1.1442604 1.08506381 0.25455453 1.104710849
## 30 2008-03-31'T'00:00:00 1.1442604 0.62815574 0.30891253 0.534473775
## 31 2008-04-30'T'00:00:00 1.1442604 0.47585305 0.41762853 1.581333964
## 32 2008-05-31'T'00:00:00 1.1442604 0.47585305 0.85249253 -0.834529956
## 33 2008-06-30'T'00:00:00 1.1442604 0.47585305 2.97245451 -0.989812878
## 34 2008-07-31'T'00:00:00 1.1442604 0.47585305 3.40731850 -0.472289773
## 35 2008-08-31'T'00:00:00 1.1442604 0.47585305 3.40731850 -0.605953116
## 36 2008-09-30'T'00:00:00 1.1442604 0.47585305 3.24424450 -0.862198292
## 37 2008-10-31'T'00:00:00 1.1442604 -0.13335772 2.91809651 -1.482172211
## 38 2008-11-30'T'00:00:00 0.6941963 -0.13335772 1.88529452 -0.971713865
## 39 2008-12-31'T'00:00:00 0.6941963 -0.66641715 1.17864052 -0.360080613
## 40 2009-01-31'T'00:00:00 -0.6559958 -0.66641715 0.90685053 -0.207254998
## 41 2009-02-28'T'00:00:00 -1.5561238 -0.66641715 0.79813453 -0.423072742
## 42 2009-03-31'T'00:00:00 -1.5561238 -0.66641715 0.68941853 -0.496886475
## 43 2009-04-30'T'00:00:00 -1.5561238 -0.66641715 0.41762853 -0.016412003
## 44 2009-05-31'T'00:00:00 -1.5561238 -0.66641715 0.09148054 0.163774784
## 45 2009-06-30'T'00:00:00 -1.5561238 -0.66641715 -1.97412344 -0.374966225
## 46 2009-07-31'T'00:00:00 -1.5561238 -0.66641715 -2.51770344 0.445798059
## 47 2009-08-31'T'00:00:00 -1.5561238 -0.66641715 -2.51770344 0.427202858
## 48 2009-09-30'T'00:00:00 -1.5561238 -0.66641715 -2.30027144 0.157962307
## 49 2009-10-31'T'00:00:00 -1.5561238 -0.66641715 -2.02848144 -0.382361775
## 50 2009-11-30'T'00:00:00 -1.5561238 -0.66641715 -1.26746945 0.212991815
## 51 2009-12-31'T'00:00:00 -1.5561238 -0.66641715 -0.61517346 0.937613949
## 52 2010-01-31'T'00:00:00 -1.5561238 -0.66641715 -0.50645746 0.758325024
## 53 2010-02-28'T'00:00:00 -1.5561238 -0.66641715 -0.56081546 0.280733163
## 54 2010-03-31'T'00:00:00 -1.1060598 -0.66641715 -0.50645746 1.770712026
## 55 2010-04-30'T'00:00:00 -1.1060598 -0.66641715 -0.39774146 0.059764525
## 56 2010-05-31'T'00:00:00 -0.6559958 -0.66641715 -0.34338346 0.134121700
## 57 2010-06-30'T'00:00:00 -0.6559958 -0.66641715 -0.28902546 0.062812531
## 58 2010-07-31'T'00:00:00 -0.2059317 -0.66641715 -0.18030946 0.498913702
## 59 2010-08-31'T'00:00:00 -0.2059317 -0.66641715 -0.07159346 0.047974175
## 60 2010-09-30'T'00:00:00 -0.2059317 -0.66641715 -0.23466746 0.964786097
## 61 2010-10-31'T'00:00:00 -0.2059317 -0.66641715 -0.12595146 0.719338898
## 62 2010-11-30'T'00:00:00 -0.2059317 -0.66641715 -0.12595146 0.151299224
## 63 2010-12-31'T'00:00:00 -0.2059317 -0.66641715 -0.01723546 -0.103433763
## 64 2011-01-31'T'00:00:00 -0.2059317 -0.66641715 0.09148054 0.138374732
## 65 2011-02-28'T'00:00:00 -0.2059317 -0.66641715 0.36327053 0.793885097
## 66 2011-03-31'T'00:00:00 -0.2059317 -0.66641715 0.41762853 0.138964013
## 67 2011-04-30'T'00:00:00 -0.2059317 -0.66641715 0.52634453 0.330767721
## 68 2011-05-31'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.929844605
## 69 2011-06-30'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.684795299
## 70 2011-07-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 0.686301582
## 71 2011-08-31'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.600546281
## 72 2011-09-30'T'00:00:00 0.2441323 -0.66641715 0.63506053 -1.628060895
## 73 2011-10-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 0.272287823
## 74 2011-11-30'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.238665243
## 75 2011-12-31'T'00:00:00 0.2441323 -0.66641715 0.41762853 1.212317519
## 76 2012-01-31'T'00:00:00 0.2441323 -0.66641715 0.25455453 1.238566051
## 77 2012-02-29'T'00:00:00 0.2441323 -0.66641715 -0.01723546 -0.216435404
## 78 2012-03-31'T'00:00:00 0.2441323 -0.66641715 -0.07159346 0.169712489
## 79 2012-04-30'T'00:00:00 0.2441323 -0.66641715 -0.18030946 0.271386180
## 80 2012-05-31'T'00:00:00 0.2441323 -0.66641715 -0.28902546 0.493720278
## 81 2012-06-30'T'00:00:00 0.2441323 -0.66641715 -0.34338346 -0.975457005
## 82 2012-07-31'T'00:00:00 0.2441323 -0.66641715 -0.45209946 1.977007231
## 83 2012-08-31'T'00:00:00 0.2441323 -0.66641715 -0.45209946 -1.281704605
## 84 2012-09-30'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.607297260
## 85 2012-10-31'T'00:00:00 0.2441323 -0.66641715 -0.50645746 1.096759569
## 86 2012-11-30'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.461319263
## 87 2012-12-31'T'00:00:00 0.2441323 -0.66641715 -0.56081546 0.176953985
## 88 2013-01-31'T'00:00:00 0.2441323 -0.66641715 -0.50645746 0.394226030
## 89 2013-02-28'T'00:00:00 0.2441323 -0.66641715 -0.39774146 -0.574200689
## 90 2013-03-31'T'00:00:00 0.2441323 -0.66641715 -0.34338346 1.555530346
## 91 2013-04-30'T'00:00:00 0.2441323 -0.66641715 -0.28902546 1.434794330
## 92 2013-05-31'T'00:00:00 0.2441323 -0.66641715 -0.23466746 -0.309202537
## 93 2013-06-30'T'00:00:00 0.2441323 -0.66641715 -0.23466746 -1.767359033
## 94 2013-07-31'T'00:00:00 0.2441323 -0.66641715 -0.12595146 -3.115306003
## 95 2013-08-31'T'00:00:00 0.2441323 -0.66641715 -0.18030946 -0.208107259
## 96 2013-09-30'T'00:00:00 0.2441323 -0.66641715 0.20019653 0.417006686
## 97 2013-10-31'T'00:00:00 0.2441323 -0.66641715 0.30891253 2.224052862
## 98 2013-11-30'T'00:00:00 0.2441323 -0.66641715 0.36327053 -0.767345283
## 99 2013-12-31'T'00:00:00 0.2441323 -0.66641715 0.52634453 0.066853148
## 100 2014-01-31'T'00:00:00 0.2441323 -0.66641715 0.63506053 -0.005555194
## 101 2014-02-28'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.149779237
## 102 2014-03-31'T'00:00:00 0.2441323 -0.66641715 0.68941853 0.129359958
## 103 2014-04-30'T'00:00:00 0.2441323 -0.66641715 0.63506053 -1.442095182
## 104 2014-05-31'T'00:00:00 0.2441323 -0.66641715 0.52634453 1.971095280
## 105 2014-06-30'T'00:00:00 0.2441323 -0.66641715 0.58070253 0.403389423
## 106 2014-07-31'T'00:00:00 0.6941963 -0.66641715 0.52634453 1.390059286
## 107 2014-08-31'T'00:00:00 0.6941963 -0.66641715 0.58070253 -1.542792094
## 108 2014-09-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 0.150721284
## 109 2014-10-31'T'00:00:00 0.6941963 -0.66641715 0.30891253 -0.926083321
## 110 2014-11-30'T'00:00:00 0.6941963 -0.66641715 0.41762853 -0.548830172
## 111 2014-12-31'T'00:00:00 0.6941963 -0.66641715 0.25455453 -0.188979720
## 112 2015-01-31'T'00:00:00 0.6941963 -0.66641715 -0.66953146 0.126651958
## 113 2015-02-28'T'00:00:00 0.6941963 -0.66641715 -1.15875345 -0.435980694
## 114 2015-03-31'T'00:00:00 0.6941963 -0.66641715 -0.72388946 1.154184479
## 115 2015-04-30'T'00:00:00 0.6941963 -0.66641715 -0.23466746 1.250073338
## 116 2015-05-31'T'00:00:00 0.6941963 -0.66641715 -0.07159346 -0.058903573
## 117 2015-06-30'T'00:00:00 0.6941963 -0.66641715 0.14583854 1.842324814
## 118 2015-07-31'T'00:00:00 0.6941963 -0.66641715 0.58070253 -0.522100102
## 119 2015-08-31'T'00:00:00 0.6941963 -0.66641715 0.47198653 -2.092402907
## 120 2015-09-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 -1.062121510
## 121 2015-10-31'T'00:00:00 0.6941963 -0.66641715 0.14583854 -0.168612895
## 122 2015-11-30'T'00:00:00 0.6941963 -0.66641715 0.20019653 0.990550729
## 123 2015-12-31'T'00:00:00 0.6941963 -0.51411445 0.25455453 0.554653467
## 124 2016-01-31'T'00:00:00 0.6941963 -0.51411445 0.68941853 0.332397341
## 125 2016-02-29'T'00:00:00 0.6941963 -0.51411445 1.06992453 -0.063436124
## 126 2016-03-31'T'00:00:00 0.6941963 -0.51411445 0.20019653 1.349118891
## 127 2016-04-30'T'00:00:00 0.6941963 -0.51411445 -0.07159346 0.722707299
## 128 2016-05-31'T'00:00:00 0.6941963 -0.51411445 -0.12595146 0.183697876
## 129 2016-06-30'T'00:00:00 0.6941963 -0.51411445 -0.34338346 0.982701049
## 130 2016-07-31'T'00:00:00 0.2441323 -0.51411445 -0.61517346 0.565706388
## 131 2016-08-31'T'00:00:00 0.2441323 -0.51411445 -0.39774146 0.186023576
## 132 2016-09-30'T'00:00:00 0.2441323 -0.51411445 -0.39774146 -1.506002422
## 133 2016-10-31'T'00:00:00 0.2441323 -0.51411445 -0.45209946 0.545930262
## 134 2016-11-30'T'00:00:00 0.2441323 -0.51411445 -0.28902546 -2.927990425
## 135 2016-12-31'T'00:00:00 0.2441323 -0.36181176 -0.28902546 -1.273418281
## 136 2017-01-31'T'00:00:00 0.2441323 -0.36181176 0.47198653 -0.695023183
## 137 2017-02-28'T'00:00:00 0.2441323 -0.36181176 1.23299852 -1.959283480
## 138 2017-03-31'T'00:00:00 0.2441323 -0.20950907 1.45043052 -5.644462424
## 139 2017-04-30'T'00:00:00 0.2441323 -0.20950907 1.12428253 1.151532950
## 140 2017-05-31'T'00:00:00 0.2441323 -0.20950907 0.85249253 1.905604022
## 141 2017-06-30'T'00:00:00 0.2441323 -0.05720638 0.63506053 -0.413334953
## 142 2017-07-31'T'00:00:00 0.2441323 -0.05720638 0.47198653 -0.376057837
## 143 2017-08-31'T'00:00:00 0.2441323 -0.05720638 0.74377653 0.292191540
## 144 2017-09-30'T'00:00:00 0.2441323 -0.05720638 1.06992453 1.159095786
## 145 2017-10-31'T'00:00:00 0.2441323 -0.05720638 0.79813453 -1.025482349
## 146 2017-11-30'T'00:00:00 0.2441323 -0.05720638 0.63506053 1.476469790
## 147 2017-12-31'T'00:00:00 0.2441323 0.09509632 0.68941853 0.774778114
## 148 2018-01-31'T'00:00:00 0.6941963 0.09509632 0.25455453 0.786075585
## 149 2018-02-28'T'00:00:00 0.6941963 0.09509632 -0.45209946 -0.940045080
## 150 2018-03-31'T'00:00:00 0.6941963 0.24739901 -0.50645746 -0.095497841
## 151 2018-04-30'T'00:00:00 0.6941963 0.24739901 -0.45209946 -0.937707094
## 152 2018-05-31'T'00:00:00 0.6941963 0.24739901 -0.23466746 -1.583064762
## 153 2018-06-30'T'00:00:00 0.6941963 0.39970170 -0.77824746 -1.619272950
## 154 2018-07-31'T'00:00:00 0.6941963 0.39970170 -0.72388946 0.628538792
## 155 2018-08-31'T'00:00:00 0.6941963 0.39970170 -1.10439545 -0.331551039
## 156 2018-09-30'T'00:00:00 0.6941963 0.55200439 -1.05003745 -1.526002069
## 157 2018-10-31'T'00:00:00 0.6941963 0.55200439 -0.88696345 0.913065448
## 158 2018-11-30'T'00:00:00 0.6941963 0.55200439 -1.10439545 -1.467854852
## 159 2018-12-31'T'00:00:00 0.6941963 0.70430708 -1.10439545 -0.546706018
## 160 2019-01-31'T'00:00:00 0.6941963 0.70430708 -1.59361745 -0.610706825
## 161 2019-02-28'T'00:00:00 0.6941963 0.70430708 -1.43054345 0.947783657
## 162 2019-03-31'T'00:00:00 0.6941963 0.70430708 -1.10439545 0.128165329
## 163 2019-04-30'T'00:00:00 0.6941963 0.70430708 -1.10439545 -1.037539931
## 164 2019-05-31'T'00:00:00 0.2441323 0.70430708 -1.10439545 -1.089133934
## 165 2019-06-30'T'00:00:00 0.2441323 0.70430708 -0.39774146 1.164851320
## 166 2019-07-31'T'00:00:00 0.2441323 0.55200439 -0.45209946 1.117312110
## 167 2019-08-31'T'00:00:00 0.2441323 0.55200439 -0.39774146 -0.427681139
## 168 2019-09-30'T'00:00:00 0.2441323 0.39970170 -0.61517346 -0.090673013
## 169 2019-10-31'T'00:00:00 0.2441323 0.24739901 -0.61517346 -0.305399145
## 170 2019-11-30'T'00:00:00 0.2441323 0.24739901 -0.72388946 0.902733416
## 171 2019-12-31'T'00:00:00 0.2441323 0.24739901 -0.66953146 1.091568271
## 172 2020-01-31'T'00:00:00 -0.2059317 0.24739901 -0.34338346 0.590563706
## 173 2020-02-29'T'00:00:00 -0.2059317 0.24739901 -0.50645746 -1.882020066
## 174 2020-03-31'T'00:00:00 -0.6559958 -0.66641715 -1.32182745 -3.145285862
## 175 2020-04-30'T'00:00:00 -0.6559958 -0.66641715 -2.78949344 -0.304330925
## 176 2020-05-31'T'00:00:00 -1.5561238 -0.66641715 -2.78949344 0.248537475
## 177 2020-06-30'T'00:00:00 -1.5561238 -0.66641715 -2.24591344 1.644272930
## 178 2020-07-31'T'00:00:00 -2.0061879 -0.66641715 -1.91976544 1.613812242
## 179 2020-08-31'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.559941876
## 180 2020-09-30'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.136886644
## 181 2020-10-31'T'00:00:00 -2.0061879 -0.66641715 -2.02848144 0.732547397
## 182 2020-11-30'T'00:00:00 -2.0061879 -0.66641715 -2.13719744 0.224184378
## 183 2020-12-31'T'00:00:00 -2.0061879 -0.66641715 -1.97412344 0.357819840
## 184 2021-01-31'T'00:00:00 -2.0061879 -0.66641715 -1.32182745 0.332006771
## 185 2021-02-28'T'00:00:00 -2.0061879 -0.66641715 -1.15875345 0.630543624
## 186 2021-03-31'T'00:00:00 -2.0061879 -0.66641715 -0.28902546 0.155984884
## 187 2021-04-30'T'00:00:00 -2.0061879 -0.66641715 1.34171452 0.918493971
## 188 2021-05-31'T'00:00:00 -2.0061879 -0.66641715 1.17864052 0.357659170
## 189 2021-06-30'T'00:00:00 -2.0061879 -0.66641715 0.63506053 -0.095975598
## 190 2021-07-31'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -1.045728435
## 191 2021-08-31'T'00:00:00 -2.0061879 -0.66641715 -0.12595146 0.540506465
## 192 2021-09-30'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -0.764365798
## 193 2021-10-31'T'00:00:00 -2.0061879 -0.66641715 0.36327053 0.428190034
## 194 2021-11-30'T'00:00:00 -2.0061879 -0.66641715 0.58070253 -1.351534428
## 195 2021-12-31'T'00:00:00 -2.0061879 -0.66641715 0.52634453 0.364322489
## 196 2022-01-31'T'00:00:00 -2.0061879 -0.66641715 0.03712254 0.886263077
## 197 2022-02-28'T'00:00:00 -2.0061879 -0.66641715 -0.01723546 -0.083081823
## 198 2022-03-31'T'00:00:00 -2.0061879 -0.51411445 -0.01723546 -0.954116472
## 199 2022-04-30'T'00:00:00 -2.0061879 -0.51411445 0.03712254 -0.700446508
## 200 2022-05-31'T'00:00:00 -1.5561238 -0.20950907 0.30891253 -0.073537074
## 201 2022-06-30'T'00:00:00 -1.5561238 0.24739901 0.63506053 -0.404043259
## 202 2022-07-31'T'00:00:00 -1.1060598 0.70430708 1.17864052 -0.972350402
## 203 2022-08-31'T'00:00:00 -1.1060598 0.70430708 1.34171452 0.615444415
## 204 2022-09-30'T'00:00:00 -0.6559958 1.16121516 1.23299852 -0.808601819
## 205 2022-10-31'T'00:00:00 -0.6559958 1.16121516 1.23299852 -0.808601819
## mfr bco metb uscpi mgdpqa
## 1 -1.778702505 -0.765925056 -0.003279066 0.947964474 0.089478283
## 2 -2.010727355 -0.887842622 -0.276476120 0.546864954 0.089478283
## 3 -2.159803322 -0.730748840 -0.156053734 0.496727515 0.089478283
## 4 -2.113978414 -0.450538301 -0.289057563 0.797552154 0.089478283
## 5 -2.061192760 -0.619623975 -0.531699683 0.597002394 0.065717858
## 6 -1.974183441 -0.453736138 -0.130890848 0.496727515 0.327082532
## 7 -1.856430830 -0.190314248 -0.621567135 0.546864954 0.327082532
## 8 -1.685892564 -0.273857761 -0.416669345 0.897827034 0.327082532
## 9 -1.680091943 -0.149941546 -0.378925015 0.947964474 0.303322107
## 10 -1.662110017 -0.084385870 -0.217163602 0.847689594 0.303322107
## 11 -1.648768588 -0.280253437 -0.057199537 0.697277274 0.303322107
## 12 -1.634847097 -0.590843435 -0.010468462 -0.155059204 0.327082532
## 13 -1.629626538 -0.728750191 -0.161445781 -0.556158724 0.327082532
## 14 -1.606424053 -0.519691543 -0.242326488 -0.205196644 0.327082532
## 15 -1.466629081 -0.655599651 0.081196339 0.045490555 0.255801257
## 16 -1.404562433 -0.793906136 -0.538889080 -0.155059204 0.255801257
## 17 -1.208501434 -0.614427489 -0.693461097 -0.004646885 0.255801257
## 18 -1.112211121 -0.366195328 -0.754570964 0.195902875 0.208280407
## 19 -0.938192483 -0.384183166 -0.876790699 0.095627995 0.208280407
## 20 -0.543170175 -0.368593706 -0.450818977 0.145765435 0.208280407
## 21 -0.541429989 -0.233884788 -0.326801893 0.145765435 0.374603382
## 22 -0.537369554 -0.008437222 -0.484968608 -0.004646885 0.374603382
## 23 -0.634819991 -0.182719383 -0.245921186 -0.205196644 0.374603382
## 24 -0.551291045 0.076305480 0.171063791 0.195902875 0.493405506
## 25 -0.469502285 0.534395748 -0.224352998 0.546864954 0.493405506
## 26 -0.384233153 0.439659802 -0.023049905 0.947964474 0.493405506
## 27 -0.370311662 0.663108720 -0.116512055 0.847689594 0.778530605
## 28 0.089097543 0.597553045 -0.120106754 0.947964474 0.778530605
## 29 0.495721093 0.912939800 -0.229745045 0.797552154 0.778530605
## 30 0.728326006 0.920934394 -0.440034882 0.797552154 0.778530605
## 31 0.948749614 1.363035473 0.336419902 0.747414714 0.778530605
## 32 1.012556448 2.019391685 0.922355689 0.897827034 0.778530605
## 33 1.046780113 2.501066007 0.485599872 1.298926553 0.540926356
## 34 1.005595703 1.867494389 0.737228738 1.599751193 0.540926356
## 35 0.861160233 1.470562769 0.446058194 1.499476313 0.540926356
## 36 0.116360463 0.835791962 0.859448472 1.248789113 0.184519983
## 37 -0.436438744 -0.477320192 -0.274678771 0.647139834 0.184519983
## 38 -0.582614400 -0.950200460 0.082993688 -0.656433604 0.184519983
## 39 -0.949793726 -1.265986945 -0.010468462 -1.157808003 -0.955980412
## 40 -0.950953850 -1.254394782 -0.666500861 -1.207945443 -0.955980412
## 41 -0.964295279 -1.235607485 0.081196339 -1.107670563 -0.955980412
## 42 -1.155135719 -1.120485324 0.174658489 -1.408495202 -2.405366330
## 43 -1.160356278 -1.057727757 -0.569444013 -1.558907522 -2.405366330
## 44 -1.126132612 -0.469325598 -0.096741216 -1.859732162 -2.405366330
## 45 -0.939352608 -0.318227761 -0.224352998 -1.909869602 -1.906397408
## 46 -0.961394968 -0.222292626 -0.416669345 -2.260831681 -1.906397408
## 47 -0.835521487 -0.304237220 -0.107525310 -1.960007042 -1.906397408
## 48 -0.683545210 -0.327421545 -0.147066989 -1.859732162 -1.288626361
## 49 -0.678324651 -0.082387222 0.223186913 -1.308220323 -1.288626361
## 50 -0.673104092 0.048324399 -0.299841657 -0.305471524 -1.288626361
## 51 -0.639460488 0.026738994 0.284296780 0.145765435 0.041957433
## 52 -0.624958935 -0.231886140 0.438868797 0.095627995 0.041957433
## 53 -0.631339618 0.013148183 0.162077045 -0.155059204 0.041957433
## 54 -0.721829310 0.217410074 0.670726823 -0.054784325 1.420062077
## 55 -0.680644899 0.406881965 -0.260299979 -0.104921765 1.420062077
## 56 -0.711388192 -0.104372357 -0.438237533 -0.205196644 1.420062077
## 57 -0.751992541 -0.089982086 -0.826464926 -0.656433604 1.206218253
## 58 -0.737490988 0.036732237 -0.664703512 -0.606296164 1.206218253
## 59 -0.724149559 -0.104772086 -0.425656090 -0.656433604 1.206218253
## 60 -0.406855576 0.201820615 -0.679082305 -0.656433604 0.279561682
## 61 -0.141187122 0.235397912 -0.693461097 -0.606296164 0.279561682
## 62 -0.112184015 0.346123046 -0.305233705 -0.656433604 0.279561682
## 63 -0.071579666 0.699084395 -0.152459036 -0.455883844 0.160759558
## 64 0.022390398 0.949315205 -0.116512055 -0.405746404 0.160759558
## 65 0.119840835 1.380623581 -0.035631349 -0.155059204 0.160759558
## 66 0.354185934 1.602873309 0.126130065 0.145765435 0.160759558
## 67 1.290986269 1.943842767 0.066817546 0.396452635 0.160759558
## 68 1.451083416 1.577690336 -0.386114411 0.597002394 0.160759558
## 69 1.542733232 1.407805202 -0.493955354 0.597002394 0.065717858
## 70 1.556654723 1.578090066 -0.213568904 0.597002394 0.065717858
## 71 1.655845346 1.502541147 0.061425499 0.697277274 0.065717858
## 72 1.348412419 1.019267907 -0.181216621 0.747414714 0.398363807
## 73 1.568836027 1.291084122 0.478410476 0.546864954 0.398363807
## 74 1.568836027 1.329458176 -0.206379507 0.496727515 0.398363807
## 75 1.502708945 1.203943041 -0.418466694 0.296177755 0.279561682
## 76 1.528231678 1.347845743 -0.339383336 0.246040315 0.279561682
## 77 1.564195530 1.814730065 -0.010468462 0.246040315 0.279561682
## 78 1.622201743 1.823524119 -0.033834000 0.145765435 0.184519983
## 79 1.633802986 1.687216282 -0.562254617 -0.054784325 0.184519983
## 80 1.639603607 0.983691961 -1.085283187 -0.355608964 0.184519983
## 81 1.535192424 0.821001962 -0.258502630 -0.355608964 0.208280407
## 82 1.552594288 1.105609528 -1.263220742 -0.506021284 0.208280407
## 83 1.575796773 1.491348715 -0.637743277 -0.355608964 0.208280407
## 84 1.726612926 1.404207635 -0.749178917 -0.205196644 0.160759558
## 85 1.773017896 1.256707365 -0.190203366 -0.104921765 0.160759558
## 86 1.819422866 1.357838986 -0.341180685 -0.305471524 0.160759558
## 87 1.854226594 1.353042229 -0.431048137 -0.355608964 0.517165931
## 88 1.883229700 1.530522228 -1.324330609 -0.405746404 0.517165931
## 89 1.889030321 1.363834932 -0.436440184 -0.205196644 0.517165931
## 90 1.854226594 1.309471689 -1.034957414 -0.455883844 -0.005563417
## 91 1.889030321 1.003678448 -1.725139445 -0.656433604 -0.005563417
## 92 1.952837155 0.924531962 -1.394427222 -0.506021284 -0.005563417
## 93 1.645404228 0.995284123 -1.135608960 -0.305471524 0.065717858
## 94 1.744014790 1.216734392 -1.398021920 -0.205196644 0.065717858
## 95 1.569996152 1.468963850 -0.634148579 -0.455883844 0.065717858
## 96 1.668606713 1.243516284 -0.355559478 -0.606296164 0.136999133
## 97 1.703410441 1.262303581 -0.432845486 -0.706571044 0.136999133
## 98 1.657005471 1.296280608 -0.165040480 -0.606296164 0.136999133
## 99 1.575796773 1.340650608 -0.188406017 -0.455883844 0.160759558
## 100 1.471385590 1.164769528 -0.768949756 -0.405746404 0.160759558
## 101 1.326370058 1.271497365 -0.035631349 -0.656433604 0.160759558
## 102 1.303167573 1.219132771 -0.199190111 -0.455883844 0.469645081
## 103 1.361173786 1.231524392 -0.341180685 -0.205196644 0.469645081
## 104 1.343771922 1.285088176 -0.896561538 -0.155059204 0.469645081
## 105 1.401778135 1.403008445 -1.175150639 -0.155059204 0.517165931
## 106 1.395977514 1.149579798 -1.257828695 -0.205196644 0.517165931
## 107 1.407578756 1.036456285 -1.218287016 -0.355608964 0.517165931
## 108 1.134949557 0.695886558 -0.235137092 -0.355608964 0.303322107
## 109 1.181354527 0.343724668 -1.705368606 -0.355608964 0.303322107
## 110 1.042139616 -0.284250734 0.088385735 -0.556158724 0.303322107
## 111 0.479479354 -0.796704245 -0.260299979 -0.806845923 0.327082532
## 112 0.166245805 -0.970186946 -0.292652261 -1.258082883 0.327082532
## 113 0.160445184 -0.586846138 -1.092472583 -1.207945443 0.327082532
## 114 -0.152788364 -0.885444244 -0.506536797 -1.258082883 0.374603382
## 115 -0.112184015 -0.418959652 -0.673690257 -1.308220323 0.374603382
## 116 -0.077380288 -0.467726679 -0.921724425 -1.207945443 0.374603382
## 117 -0.129585879 -0.546473435 -0.477779212 -1.157808003 0.160759558
## 118 -0.640040550 -1.001365865 -1.484294674 -1.107670563 0.160759558
## 119 -0.756052976 -0.923818298 -0.080565075 -1.107670563 0.160759558
## 120 -0.837261673 -1.154862080 -0.170432527 -1.207945443 0.113238708
## 121 -0.796657325 -1.107294243 0.273512686 -1.107670563 0.113238708
## 122 -0.761853597 -1.305160458 -0.071578330 -0.957258243 0.113238708
## 123 -0.721249248 -1.598162348 -0.475981863 -0.856983363 0.089478283
## 124 -0.709648006 -1.699693699 -0.943292613 -0.506021284 0.089478283
## 125 -0.703847384 -1.650526942 -0.591012202 -0.706571044 0.089478283
## 126 -0.622638687 -1.505425051 0.099169829 -0.756708483 -0.005563417
## 127 -0.622638687 -1.164455594 -0.283665516 -0.656433604 -0.005563417
## 128 -0.605236823 -1.102097756 -1.322533260 -0.706571044 -0.005563417
## 129 -0.611037444 -1.102497486 -0.919927076 -0.706571044 -0.029323841
## 130 -0.605236823 -1.391102349 -1.568770079 -0.806845923 -0.029323841
## 131 -0.593635580 -1.208026134 -0.382519713 -0.656433604 -0.029323841
## 132 -0.582034338 -1.127280729 -0.553267872 -0.455883844 0.041957433
## 133 -0.576233716 -1.157660188 -0.157851083 -0.405746404 0.041957433
## 134 -0.657442414 -1.070918838 -0.289057563 -0.355608964 0.041957433
## 135 -0.761853597 -0.817090461 -0.344775383 -0.155059204 0.113238708
## 136 -0.738651112 -0.861860190 -1.065512348 0.045490555 0.113238708
## 137 -0.738651112 -0.866257217 -0.346572732 0.145765435 0.113238708
## 138 -0.715448627 -0.976582622 -0.939697915 -0.004646885 0.303322107
## 139 -0.674844278 -1.020552892 -0.355559478 -0.104921765 0.303322107
## 140 -0.564632474 -1.077314513 -0.919927076 -0.255334084 0.303322107
## 141 -0.512426883 -1.172849918 -0.134485546 -0.405746404 0.327082532
## 142 -0.483423776 -0.983777757 -0.466995118 -0.355608964 0.327082532
## 143 -0.419616942 -0.994570460 -0.112917357 -0.255334084 0.327082532
## 144 -0.379012593 -0.788309920 -0.366343572 -0.104921765 0.422124231
## 145 -0.361610730 -0.635213435 -0.035631349 -0.205196644 0.422124231
## 146 -0.338408245 -0.547272895 -0.123701452 -0.104921765 0.422124231
## 147 -0.309405138 -0.415362085 -0.608985692 -0.155059204 0.350842957
## 148 -0.233997062 -0.328221004 -0.174027225 -0.155059204 0.350842957
## 149 -0.233997062 -0.458932625 -0.290854912 -0.104921765 0.350842957
## 150 0.003828410 -0.279453977 0.728241993 -0.004646885 0.232040832
## 151 0.102438972 -0.083586411 0.437071448 0.045490555 0.232040832
## 152 0.044432759 0.013148183 -0.452616326 0.195902875 0.232040832
## 153 -0.175990849 0.087098183 -0.833654322 0.246040315 0.113238708
## 154 -0.187592092 -0.120361546 -0.414871996 0.246040315 0.113238708
## 155 -0.193392713 0.006352778 -1.622690550 0.145765435 0.113238708
## 156 -0.274601411 0.218209533 0.825298841 -0.054784325 0.041957433
## 157 -0.350009487 -0.071594519 1.019412537 0.045490555 0.041957433
## 158 -0.332607623 -0.741541542 -0.502942099 -0.104921765 0.041957433
## 159 -0.367411351 -0.937808838 0.007505028 -0.255334084 0.113238708
## 160 -0.326807002 -0.614427489 0.156684998 -0.405746404 0.113238708
## 161 -0.309405138 -0.448939382 0.075804292 -0.455883844 0.113238708
## 162 -0.274601411 -0.354603166 0.672524172 -0.255334084 0.089478283
## 163 -0.251398926 -0.178322356 0.030870566 -0.205196644 0.089478283
## 164 -0.315205760 -0.510497760 -0.280070818 -0.305471524 0.089478283
## 165 -0.292003274 -0.428153436 -0.023049905 -0.405746404 0.136999133
## 166 -0.222395819 -0.483316138 0.654550682 -0.305471524 0.136999133
## 167 -0.245598304 -0.672788029 0.047046707 -0.355608964 0.136999133
## 168 -0.274601411 -0.658797489 -0.411277298 -0.355608964 0.041957433
## 169 -0.263000168 -0.680782624 1.202742139 -0.305471524 0.041957433
## 170 -0.263000168 -0.592842084 -0.724016031 -0.155059204 0.041957433
## 171 -0.239797683 -0.450138571 0.334622553 -0.054784325 -0.171886391
## 172 -0.204993956 -0.763526677 0.250147148 0.045490555 -0.171886391
## 173 -0.251398926 -1.068920189 0.356190742 -0.054784325 -0.171886391
## 174 -0.350009487 -2.179369372 0.300472921 -0.455883844 -0.860938713
## 175 -0.303604517 -2.078237751 -2.564501446 -1.057533123 -0.860938713
## 176 -0.280402032 -1.676109645 -0.044618094 -1.157808003 -0.860938713
## 177 -0.251398926 -1.443466943 1.835409000 -0.907120803 -5.090294343
## 178 -0.204993956 -1.357525052 2.613661134 -0.706571044 -5.090294343
## 179 -0.193392713 -1.278378566 0.464031684 -0.556158724 -5.090294343
## 180 -0.158588985 -1.451461538 2.033117395 -0.506021284 -1.621272309
## 181 -0.181791470 -1.590967213 2.065469677 -0.606296164 -1.621272309
## 182 -0.141187122 -1.186040999 1.152416366 -0.606296164 -1.621272309
## 183 -0.007772832 -1.017754784 1.806651416 -0.506021284 -1.811355708
## 184 0.050233380 -0.854665055 1.071535659 -0.506021284 -1.811355708
## 185 0.073435865 -0.444942084 1.305191034 -0.355608964 -1.811355708
## 186 0.050233380 -0.548472084 2.428534183 0.095627995 -1.146063811
## 187 0.177847048 -0.400172355 1.747338898 0.897827034 -1.146063811
## 188 0.183647669 -0.317428301 0.559291183 1.298926553 -1.146063811
## 189 0.195248912 -0.085185330 2.088835215 1.499476313 2.750645870
## 190 0.195248912 -0.037217762 0.561088532 1.499476313 2.750645870
## 191 0.496881218 -0.170727491 2.784409293 1.449338873 2.750645870
## 192 0.433074384 0.050323048 2.779017246 1.499476313 -2.096480807
## 193 0.485279975 0.284564668 2.814964226 1.900575832 -2.096480807
## 194 0.520083703 -0.267462085 1.492115334 2.201400472 -2.096480807
## 195 0.531684945 0.020743048 3.657920926 2.301675352 -0.171886391
## 196 0.485279975 0.557580072 1.431005467 2.552362551 -0.171886391
## 197 0.467878111 0.948515745 1.648484700 2.752912311 -0.171886391
## 198 0.456276869 1.225128717 2.868884698 3.053736951 0.160759558
## 199 0.276457609 1.282290068 2.308111798 2.953462071 0.160759558
## 200 0.293859473 1.821925200 0.370569534 3.103874390 0.160759558
## 201 0.073435865 1.500942229 2.016941253 3.354561590 1.087416128
## 202 0.085037108 1.309071959 0.890003406 3.053736951 1.087416128
## 203 0.027030895 0.768637368 1.150619017 2.953462071 1.087416128
## 204 -0.094782151 0.427667911 3.787330056 2.903324631 1.087416128
## 205 -0.187592092 0.702282233 3.787330056 2.903324631 1.087416128
## myrer outlier
## 1 0.158220697 0
## 2 0.163543850 0
## 3 0.167802371 0
## 4 0.106053807 0
## 5 0.030465048 0
## 6 -0.037458372 0
## 7 -0.161168425 0
## 8 -0.148392860 0
## 9 -0.055770015 0
## 10 -0.092393301 0
## 11 -0.041929820 0
## 12 -0.027024994 0
## 13 -0.099206936 0
## 14 -0.180331773 0
## 15 -0.369835986 0
## 16 -0.428603584 0
## 17 -0.422002876 0
## 18 -0.516542056 0
## 19 -0.593195446 0
## 20 -0.645362336 0
## 21 -0.524207395 0
## 22 -0.524207395 0
## 23 -0.424132137 0
## 24 -0.621088762 0
## 25 -0.769285315 0
## 26 -0.728616434 0
## 27 -0.828691692 0
## 28 -0.990515515 0
## 29 -1.078028134 0
## 30 -1.080157395 0
## 31 -1.151913485 0
## 32 -0.978804580 0
## 33 -0.924508429 0
## 34 -0.948994929 1
## 35 -0.653027675 1
## 36 -0.560404829 1
## 37 -0.324056878 0
## 38 -0.164362317 0
## 39 -0.496527004 0
## 40 -0.199495120 0
## 41 0.007894884 0
## 42 -0.113260057 0
## 43 -0.301486713 0
## 44 -0.439036962 0
## 45 -0.386657146 0
## 46 -0.379417659 0
## 47 -0.381546920 0
## 48 -0.509302569 0
## 49 -0.613636350 0
## 50 -0.656221566 0
## 51 -0.583826698 0
## 52 -0.619385354 0
## 53 -0.634290179 0
## 54 -0.930257433 0
## 55 -1.100598299 0
## 56 -0.935154733 0
## 57 -0.988386254 0
## 58 -1.104430968 0
## 59 -1.173631945 0
## 60 -1.306071968 0
## 61 -1.254543856 0
## 62 -1.136369881 0
## 63 -1.314163159 0
## 64 -1.362071527 0
## 65 -1.389751918 0
## 66 -1.437660287 0
## 67 -1.574997609 0
## 68 -1.462146786 0
## 69 -1.450435851 0
## 70 -1.560092784 0
## 71 -1.552001593 0
## 72 -1.089526143 0
## 73 -1.352489854 0
## 74 -1.109754120 0
## 75 -1.133814768 0
## 76 -1.406360153 0
## 77 -1.503667372 0
## 78 -1.356748375 0
## 79 -1.432337135 0
## 80 -1.117206533 0
## 81 -1.110818751 0
## 82 -1.214087901 0
## 83 -1.226863465 0
## 84 -1.367394680 0
## 85 -1.386558027 0
## 86 -1.407637709 0
## 87 -1.367394680 0
## 88 -1.266680643 0
## 89 -1.299258333 0
## 90 -1.292231773 0
## 91 -1.401462853 0
## 92 -1.288612029 0
## 93 -1.150210076 0
## 94 -0.972416798 1
## 95 -0.885755882 0
## 96 -0.939413255 0
## 97 -1.160430528 0
## 98 -1.017131275 0
## 99 -0.905345082 0
## 100 -0.753102933 0
## 101 -0.902151191 0
## 102 -0.926637690 0
## 103 -0.926637690 0
## 104 -1.038423883 0
## 105 -1.042682405 0
## 106 -1.075260095 0
## 107 -1.168308793 0
## 108 -0.894698778 0
## 109 -0.875535430 0
## 110 -0.676875396 0
## 111 -0.434778441 0
## 112 -0.152012604 0
## 113 -0.205457050 0
## 114 0.005978549 0
## 115 -0.296376487 0
## 116 -0.070674841 0
## 117 0.153962176 0
## 118 0.264683738 0
## 119 1.052510242 0
## 120 1.479427036 0
## 121 1.273314589 0
## 122 1.199429238 0
## 123 1.260113171 0
## 124 0.964571770 0
## 125 1.069544328 0
## 126 0.423313670 0
## 127 0.433959974 0
## 128 0.910914397 0
## 129 0.704376098 0
## 130 0.788056048 0
## 131 0.744832053 0
## 132 0.926245075 0
## 133 1.050380981 0
## 134 1.629965776 0
## 135 1.672550992 0
## 136 1.549692643 0
## 137 1.575243773 0
## 138 1.543304860 1
## 139 1.363382321 0
## 140 1.236265450 0
## 141 1.261816580 0
## 142 1.236265450 0
## 143 1.214334064 0
## 144 1.106806392 0
## 145 1.131292892 0
## 146 0.831067116 0
## 147 0.736315010 0
## 148 0.421184409 0
## 149 0.460575734 0
## 150 0.346660280 0
## 151 0.474415929 0
## 152 0.594293313 0
## 153 0.719280923 0
## 154 0.776132187 0
## 155 0.869393811 0
## 156 0.931781153 0
## 157 1.029514225 0
## 158 1.029514225 0
## 159 0.921560701 0
## 160 0.840222938 0
## 161 0.777409744 0
## 162 0.811903769 0
## 163 0.924115814 0
## 164 1.041863938 0
## 165 0.918366810 0
## 166 0.906655875 0
## 167 1.074867480 0
## 168 1.036966638 0
## 169 1.016738660 0
## 170 1.015886956 0
## 171 0.831067116 0
## 172 0.845971942 0
## 173 1.095095458 0
## 174 1.321222957 1
## 175 1.280767001 0
## 176 1.375093256 0
## 177 1.246911754 1
## 178 1.146836496 1
## 179 0.986503156 1
## 180 0.970533700 0
## 181 0.969043217 0
## 182 0.794443830 0
## 183 0.680528376 0
## 184 0.722474815 0
## 185 0.743341571 0
## 186 0.946047201 0
## 187 0.824679334 0
## 188 0.903887836 0
## 189 0.954564244 0
## 190 1.106806392 0
## 191 0.967765661 0
## 192 1.033772746 0
## 193 0.936039675 0
## 194 1.071247737 0
## 195 0.990761678 1
## 196 1.032282264 0
## 197 1.061666063 0
## 198 1.070608959 1
## 199 1.390636860 0
## 200 1.440035711 1
## 201 1.507107427 1
## 202 1.597175159 1
## 203 1.650832532 0
## 204 1.994708154 1
## 205 2.184638219 1
Counting the number of outliers in each variable
outliers_z %>% group_by(df$mpr) %>% summarize(count=sum(outlier))
## # A tibble: 9 × 2
## `df$mpr` count
## <dbl> <dbl>
## 1 1.75 4
## 2 2 3
## 3 2.25 1
## 4 2.5 3
## 5 2.7 0
## 6 2.75 0
## 7 3 2
## 8 3.25 0
## 9 3.5 3
outliers_z %>% group_by(df$upr) %>% summarize(count=sum(outlier))
## # A tibble: 22 × 2
## `df$upr` count
## <dbl> <dbl>
## 1 0.125 6
## 2 0.375 1
## 3 0.625 0
## 4 0.875 2
## 5 1 0
## 6 1.12 0
## 7 1.38 0
## 8 1.62 1
## 9 1.88 0
## 10 2 3
## # … with 12 more rows
outliers_z %>% group_by(df$mcpi) %>% summarize(count=sum(outlier))
## # A tibble: 62 × 2
## `df$mcpi` count
## <dbl> <dbl>
## 1 -2.9 0
## 2 -2.4 0
## 3 -2 0
## 4 -1.9 1
## 5 -1.7 0
## 6 -1.5 0
## 7 -1.4 1
## 8 -1.3 1
## 9 -0.7 0
## 10 -0.4 0
## # … with 52 more rows
outliers_z %>% group_by(df$mnfbf) %>% summarize(count=sum(outlier))
## # A tibble: 204 × 2
## `df$mnfbf` count
## <dbl> <dbl>
## 1 -23043. 1
## 2 -12466. 1
## 3 -12339. 1
## 4 -11546. 0
## 5 -8009. 0
## 6 -7446. 0
## 7 -7119. 0
## 8 -6634. 0
## 9 -6044. 0
## 10 -6007. 0
## # … with 194 more rows
outliers_z %>% group_by(df$mfr) %>% summarize(count=sum(outlier))
## # A tibble: 180 × 2
## `df$mfr` count
## <dbl> <dbl>
## 1 70.5 0
## 2 71.3 0
## 3 72.2 0
## 4 73.1 0
## 5 73.7 0
## 6 75.7 0
## 7 77.1 0
## 8 78.7 0
## 9 78.8 0
## 10 79.1 0
## # … with 170 more rows
outliers_z %>% group_by(df$bco) %>% summarize(count=sum(outlier))
## # A tibble: 203 × 2
## `df$bco` count
## <dbl> <dbl>
## 1 22.7 1
## 2 25.3 0
## 3 34.7 0
## 4 35.3 0
## 5 36.0 0
## 6 37.3 0
## 7 37.5 0
## 8 39.6 0
## 9 41.0 0
## 10 41.2 1
## # … with 193 more rows
outliers_z %>% group_by(df$metb) %>% summarize(count=sum(outlier))
## # A tibble: 189 × 2
## `df$metb` count
## <dbl> <dbl>
## 1 -3.63 0
## 2 1.04 0
## 3 1.15 0
## 4 1.61 0
## 5 1.91 0
## 6 2.38 0
## 7 2.86 1
## 8 2.88 0
## 9 3.27 0
## 10 3.28 0
## # … with 179 more rows
outliers_z %>% group_by(df$uscpi) %>% summarize(count=sum(outlier))
## # A tibble: 64 × 2
## `df$uscpi` count
## <dbl> <dbl>
## 1 -2.1 0
## 2 -1.5 0
## 3 -1.4 0
## 4 -1.3 0
## 5 -0.7 0
## 6 -0.4 0
## 7 -0.2 0
## 8 -0.1 0
## 9 0 0
## 10 0.1 0
## # … with 54 more rows
outliers_z %>% group_by(df$mgdpqa) %>% summarize(count=sum(outlier))
## # A tibble: 39 × 2
## `df$mgdpqa` count
## <dbl> <dbl>
## 1 -17.1 3
## 2 -5.8 0
## 3 -4.5 0
## 4 -3.7 0
## 5 -3.3 0
## 6 -2.5 0
## 7 -1.1 0
## 8 -0.5 0
## 9 0.3 0
## 10 0.7 1
## # … with 29 more rows
Once we have identified the outliers in our dataset using the Z-score, there are several ways to handle them
Remove the outliers: One option is to simply remove the outliers
from the dataset. This is a good option if the outliers are caused by
errors or mistakes in the data.
Winsorize the outliers: Another option is to “winsorize” the
outliers, which means replacing them with the nearest non-outlier value.
For example, if an outlier is above the mean + 3 standard deviations, it
can be replaced with the mean + 3 standard deviations. You can use the
winsorize() function from the MASS library to winsorize the data.
Trim the outliers: A third option is to “trim” the outliers,
which means removing a certain percentage of the lowest and highest
values in the data. You can use the trim_mean() function from the stats
library to trim the data.
Transform the data: In some cases, it may be appropriate to
transform the data using a function such as log, square root, or Box-Cox
to reduce the influence of the outliers. This can make the data more
symmetrical and easier to model.
Use robust methods: Finally, we can use robust statistical
methods that are less sensitive to outliers. For example, we can use the
median instead of the mean to measure central tendency, or use robust
regression methods such as the MM-estimator or the Tukey method to fit a
model to the data.
Interquartile range (IQR) can be used to identify and handle outliers in a dataset. The IQR is the difference between the 75th percentile and the 25th percentile of the data, and values that are greater than the 75th percentile + 1.5 * IQR or less than the 25th percentile - 1.5 * IQR are considered to be outliers.
To fix outliers using the IQR, we can replace the outliers with the nearest non-outlier value. For example, if an outlier is above the 75th percentile + 1.5 * IQR, we can replace it with the 75th percentile + 1.5 * IQR. If an outlier is below the 25th percentile - 1.5 * IQR, you can replace it with the 25th percentile - 1.5 * IQR.