I'm following some example.(https://www.eventstudytools.com/blog/dieselgate-example-data-preparation) Instead of pulling data from Yahoo, This is my firmData.
code date value
KS233740Equity 05.12.2016 7225
KS233740Equity 07.12.2016 7235
KS233740Equity 06.12.2016 7355
KS233740Equity 08.12.2016 7395
KS233740Equity 02.12.2016 7430
KS233160Equity 05.12.2016 7540
KS233160Equity 07.12.2016 7605
KS233740Equity 09.12.2016 7650
KS233740Equity 01.12.2016 7665
KS233740Equity 28.11.2016 7680
KS233160Equity 06.12.2016 7705
KS233740Equity 30.11.2016 7720
KS233740Equity 24.11.2016 7750
KS233740Equity 29.11.2016 7760
KS233160Equity 08.12.2016 7770
KS233160Equity 02.12.2016 7800
KS233740Equity 25.11.2016 7830
KS233740Equity 12.12.2016 7850
KS233740Equity 25.01.2017 7855
KS233740Equity 24.01.2017 7885
When I importing this,is.numeric(firmData$value)=true
. But when I want to transfer it to csv file in specific manner, this seems to become non-numeric.
library(dplyr)
firmData %>%
dplyr::select(code, date, value) %>%
dplyr::mutate(date = format(date, "%d.%m.%Y")) # this is for this specific code
readr::write_delim(path = "02_firmDataPrice.csv",
delim = ";", col_names = F)
library(EventStudy)
key <- "573e58c665fcc08cc6e5a660beaad0cb"
est <- EventStudyAPI$new()
est$authentication(apiKey = key)
esaParams <- EventStudy::ARCApplicationInput$new()
esaParams$setResultFileType("csv")
esaParams$setBenchmarkModel("garch")
dataFiles <- c("request_file" = "01_requestFile.csv",
"firm_data" = "02_firmDataPrice.csv",
"market_data" = "03_marketDataPrice.csv")
EventStudy::checkFiles(dataFiles)
Then,
Error: Column firm is not of type Integer! inherits from numeric not character.
What could I do to use package "EventStudy" properly??
(market_data looks very similar to "firmData" and data "request" for making "01_requestFile.csv" is looking like below. There seems to be no problem with it as of yet.)
"1" "KS233740Equity" "indexData" "04.04.2018" "leverage" "-10" "10" "-11" "250"
"2" "KS233160Equity" "indexData" "04.04.2018" "leverage" "-10" "10" "-11" "250"
"3" "KS278240Equity" "indexData" "04.04.2018" "Other" "-10" "10" "-11" "250"