Handling of NA values in Regression() function?
Hi,
I think this issue is similar to issue #228 (closed).
I'm using the Regression() function to compute some (auto)regression of observations for each grid point globally. However, my script crashes because Regression() has currently no way of handling NA values when at least one of the time series used in the regression (x or y) only has missing values (for example for some grid points in polar regions). I get the following error message:
"Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases Calls: Regression -> lm -> lm.fit"
Do you think you could implement some similar feature as for the Season() function in issue #228 (closed), i.e., returning NA values as output of the Regression() function when (at least one of) the time series (x and/or y) has only NA values (or maybe we should define a threshold for the number of acceptable missing values?)?
Thanks for your help and suggestions!
Cheers,
Deborah