title: How to deal with external regressors in time series recipes?
body: <p>In time series forecasting external regressors can make a big difference. Currently I want to track the effects of external regressors, using the modeltime framework.</p>
  <p>However, I could not find any helpful information on this topic so far. I only found out, that you can add regressor variables with a &quot;+&quot; to your recipe.</p>
  <p>After adding the variables Transactions (number of transactions per day and Store) and Open_Closed (1 = Store is closed, and 0 = Store is open) to my recipe, I found out, that there was no effect on the prediction. How can I achieve this?</p>
  <p>some reprex data:</p>
  <pre><code>suppressPackageStartupMessages(library(modeltime))
  suppressPackageStartupMessages(library(tidymodels))
  suppressPackageStartupMessages(library(lubridate))
  suppressPackageStartupMessages(library(timetk))
  
  
  #### DATA
  
  data &lt;- data.frame (Store = c(rep(&quot;1&quot;,365),rep(&quot;2&quot;,365)),
                      Sales = c(seq( 1, 44, length.out = 365)),
                      Date = c(dates &lt;- ymd(&quot;2013-01-01&quot;)+ days(0:364)),
                      Transactions = c(seq( 50, 100, length.out = 365)),
                      Open_Closed = sample(rep(0:1,each=365))
  )
  
  h = 42
  
  # split
  set.seed(234)
  splits &lt;- time_series_split(data, assess = &quot;42 days&quot;, cumulative = TRUE)
  
  # recipe
  recipe_spec &lt;- recipe(Sales ~ Date + Transactions + Open_Closed, data) %&gt;%
    step_timeseries_signature(Date) %&gt;%
    step_rm(matches(&quot;(iso$)|(xts$)|(day)|(hour)|(min)|(sec)|(am.pm)&quot;)) %&gt;% 
  step_dummy(all_nominal())    
  recipe_spec %&gt;% prep() %&gt;% juice()
  
  
  #### MODELS
  
  # elnet
  model_spec_glmnet &lt;- linear_reg(penalty = 1) %&gt;%
    set_engine(&quot;glmnet&quot;)
  wflw_fit_glmnet &lt;- workflow() %&gt;%
    add_model(model_spec_glmnet) %&gt;%
    add_recipe(recipe_spec %&gt;% step_rm(Date)) %&gt;%
    fit(training(splits))
  
  # xgboost
  model_spec_xgboost &lt;- boost_tree(&quot;regression&quot;, learn_rate = 0.35) %&gt;%
    set_engine(&quot;xgboost&quot;)
  set.seed(123)
  wflw_fit_xgboost &lt;- workflow() %&gt;%
    add_model(model_spec_xgboost) %&gt;%
    add_recipe(recipe_spec %&gt;% step_rm(Date)) %&gt;%
    fit(training(splits))
  
  # sub tbl
  submodels_tbl &lt;- modeltime_table(
    wflw_fit_glmnet,
    wflw_fit_xgboost
  )
  
  submodels_tbl %&gt;% 
    modeltime_accuracy(testing(splits)) %&gt;%
    table_modeltime_accuracy(.interactive = FALSE)
  </code></pre>