我想执行 OLS 面板回归
import pandas as pd
import numpy as np
import statsmodels.api as sm
from linearmodels.datasets import wage_panel
from linearmodels.panel import PanelOLS
data = wage_panel.load()
但我得到这个错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-fe79e40655e1> in <module>
3 import statsmodels.api as sm
4
----> 5 from linearmodels.datasets import wage_panel
6 from linearmodels.panel import PanelOLS
7
ModuleNotFoundError: No module named 'linearmodels'
我不知道为什么会这样。有任何想法吗?