An extension to the R tidyverse for automated ML. The package allows fitting and cross validation of linear regression and classification algorithms on grouped data.
The above code runs without any errors. The problem is when using the predict function:
predict(models_df, Factor_Industry_Returns)
Which gives the error:
"Error in `map()`:
ℹ In index: 1.
Caused by error:
! object 'Mkt-RF' not found"
My first instinct was that the reduced-form model was potentially eliminating the 'Mkt-RF' variable. However, evaluating coef(models_df, Factor_Industry_Returns) proved this not to be the case.
The issue is actually with the column name 'Mkt-RF'. I suspect the package does not like the hyphen? To show that might be the case the code below - where I re-named the column - works without giving the same error.
Thanks for pointing this out! The issue was indeed caused by syntactically invalid names for that method. I've pushed a fix and will include in the upcoming release on CRAN.
I discovered a small issue that appears to be coming from the 'gaselect' package.
For a quick replication I ran the following estimation code:
The above code runs without any errors. The problem is when using the
predict
function:predict(models_df, Factor_Industry_Returns)
Which gives the error:
My first instinct was that the reduced-form model was potentially eliminating the 'Mkt-RF' variable. However, evaluating
coef(models_df, Factor_Industry_Returns)
proved this not to be the case.The issue is actually with the column name 'Mkt-RF'. I suspect the package does not like the hyphen? To show that might be the case the code below - where I re-named the column - works without giving the same error.