Converts a model function (e.g., lm, glm) to a model specification list
with fit and predict functions compatible with the chronofeat API.
Value
A list with fit and predict functions:
fit(y, X, ...)- Fits the model with response y and predictors Xpredict(object, newdata, ...)- Generates predictions from fitted model
Details
This function provides backward compatibility for users who want to pass
model functions directly (e.g., model = lm) instead of model specifications.
The wrapper creates a formula-based interface internally, combining y and X into a temporary data frame and fitting the model using the standard R formula interface.
Supported model functions include any that accept the standard formula/data
interface: lm, glm, randomForest::randomForest, ranger::ranger, etc.
