Skip to content

SETAR predict not working with "none" #43

Description

@TheBridgeTroll

Hello!
The case is pretty simple. Say I define a simple SETAR model:

set <- setar(training, m=1, nthresh = 1, include = "const")
and then I'm trying to calculate a prediction from that:
> predict(set, n.ahead = 1) Time Series: Start = 80 End = 80 Frequency = 1 [1] -1.083009
everything works just fine. However the same code with include="none":

set <- setar(training, m=1, nthresh = 1, include = "none")
predict(set, n.ahead = 1)
Time Series:
Start = 80
End = 80
Frequency = 1
[1] NaN

I really don't think it's the fault of the data (this error has been occurring to me multiple times on different datasets) so if I'm not doing anything wrong (am I?) I think that this is a bug that will need some attention.

Hope you have a nice day!


PS: the dataset I'm using is the datasets::lynx

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions