### Install tsEMOS from GitHub Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Installs the development version of the tsEMOS package from GitHub. Ensure the 'remotes' package is installed first. ```r # install.packages("remotes") remotes::install_github("jobstdavid/tsEMOS") ``` -------------------------------- ### Load R-package and data for tsEMOS Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Loads the tsEMOS package and prepares sample station data. Splits the data into training and testing sets based on a date threshold. ```r # load package library(tsEMOS) #> Registered S3 method overwritten by 'quantmod': #> method from #> as.zoo.data.frame zoo # load data for station Hannover data(station) # select data for lead time 24 hours data <- station[station$lt == 24, ] # split data in training and test data train <- data[data$date <= as.Date("2019-12-31"), ] test <- data[data$date > as.Date("2019-12-31"), ] ``` -------------------------------- ### Fit DAR-GARCH-SEMOS (additive) model Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Fits an additive deseasonalized autoregressive smooth EMOS with GARCH (DAR-GARCH-SEMOS (+)) model. Requires training and testing data, and column indices for day of year, observations, mean, and standard deviation. ```r fit <- dargarchadd_semos(train = train, test = test, doy_col = 3, obs_col = 9, mean_col = 10, sd_col = 11, n_ahead = 0) ``` -------------------------------- ### Fit DAR-GARCH-SEMOS (multiplicative) model Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Fits a multiplicative deseasonalized autoregressive smooth EMOS with GARCH (DAR-GARCH-SEMOS ($\cdot$)) model. Uses specified training and testing data and column mappings. ```r fit <- dargarchmult_semos(train = train, test = test, doy_col = 3, obs_col = 9, mean_col = 10, sd_col = 11, n_ahead = 0) ``` -------------------------------- ### Fit SEMOS model Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Fits a smooth EMOS (SEMOS) model using provided training and testing data. Specifies column indices for day of year, observations, mean, and standard deviation. ```r fit <- semos(train = train, test = test, doy_col = 3, obs_col = 9, mean_col = 10, sd_col = 11, n_ahead = 0) ``` -------------------------------- ### Fit SAR-SEMOS model Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Fits a standardized autoregressive smooth EMOS (SAR-SEMOS) model using the provided training and testing datasets. Column indices for key variables must be specified. ```r fit <- sar_semos(train = train, test = test, doy_col = 3, obs_col = 9, mean_col = 10, sd_col = 11, n_ahead = 0) ``` -------------------------------- ### Fit DAR-SEMOS model Source: https://github.com/jobstdavid/tsemos/blob/main/README.md Fits a deseasonalized autoregressive smooth EMOS (DAR-SEMOS) model. Requires training and testing data, along with column indices for relevant variables. ```r fit <- dar_semos(train = train, test = test, doy_col = 3, obs_col = 9, mean_col = 10, sd_col = 11, n_ahead = 0) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.