Closed ashraaghav closed 6 years ago
Working on a fix now, something is not correct with the parsing of the formula.
A few changes to your example:
Ozone
should be the response instead of y
, it probably worked for you because you had y
somewhere in your environmentARMA
is used with the coefficients for the AR and MA terms, so this would have the AR and MA coefficients both as 1 (unlikely what you intended, but this is something I intend to change).train
library(fasster)
library(fable)
library(tsibble)
# Preparing the data
train <- airquality %>% mutate(
date = as.Date(paste('2018', Month, Day, sep = '-')),
Ozone = round(imputeTS::na.interpolation(Ozone, option = 'stine')),
Solar.R = round(imputeTS::na.interpolation(Solar.R, option = 'stine'))
) %>%
as_tsibble()
# Creating formula
f <- as.formula('Ozone ~ Wind + Temp + Solar.R + trig(12) + poly(1) + ARMA(1, 1)')
# Building fasster without formula parsing
fsModel <- FASSTER(data = train,
formula = Ozone ~ Wind + Temp + Solar.R + trig(12) + poly(1) + ARMA(1, 1))
# Building fasster - throws an error
fsModel <- FASSTER(data = train, formula = f)
Apologies for the typo. Thanks for the fix!
Hi, Great work on the package by the way.
I want to generate my formula dynamically from a list of variable names. So I tried to paste them into a string and convert that into a formula. However, this is throwing an error saying "No supported inverse for this function"
Example:
I am not sure if I am doing anything wrong here. The same formula when passed directly worked perfectly fine.