Changes the creation of the vector lags in the case when p = 0 and P > 0 to the correct collection of lags by checking for that combination of inputs and using seq_len() rather than 1:p for safety.
Adds a check in nnetar() that will stop() with an error if both p = 0 and P = 0, so at least one type of lag must be requested.
In the case of non-seasonal data (m = 1) if the user sets p = 0, it will fall back to the default calculation for p with a warning.
Modifies description of the argument p to document what happens if p = 0
Added tests for the seasonal only lag case mimicking the existing tests for default size
Added test for stopping in the case that the user sets both p = 0 and P = 0
Closes issue #935.
lags
in the case whenp = 0
andP > 0
to the correct collection of lags by checking for that combination of inputs and usingseq_len()
rather than1:p
for safety.nnetar()
that willstop()
with an error if bothp = 0
andP = 0
, so at least one type of lag must be requested.m = 1
) if the user setsp = 0
, it will fall back to the default calculation forp
with a warning.p
to document what happens ifp = 0
p = 0
andP = 0