我正在使用pandas.ols
0.7.3版本的功能.我有兴趣做一个动态回归,例如:
model = pandas.ols(y = realizedData, x = pastData, intercept = 0, window_type="rolling", window = 80, min_periods = 80)
Run Code Online (Sandbox Code Playgroud)
输入包含大约600个日期的数据,其中15个是NA值.但输出仅包含大约120个日期的回归结果.问题是,只要窗口包含一个NA值,该窗口就没有输出.如果我将window_type更改为expanding
并且按预期获得大约500个输出点,问题就会消失,但我不想进行扩展回归.
你能告诉我怎么解决这个问题吗?