model = PanelOLS(panel_data[‘Fiyat’], panel_data.drop(columns=[‘Fiyat’]))
result = model.fit()
and
Bağımlı değişken: ‘Fiyat’ sütunu
y = panel_data[‘Fiyat’]
Bağımsız değişkenler: ‘Fiyat’ sütunu dışındaki tüm sütunlar
X = panel_data.drop(columns=[‘Fiyat’])
PanelOLS modelini oluşturma
model = PanelOLS(y, X)
Modeli uygulama ve sonuçları elde etme
result = model.fit()
I keep getting this error with these codes:
ValueError Traceback (most recent call last)
in <cell line: 13>()
11
12 # PanelOLS modelini oluşturma
—> 13 model = PanelOLS(y, X)
14
15 # Modeli uygulama ve sonuçları elde etme
2 frames
/usr/local/lib/python3.10/dist-packages/linearmodels/panel/data.py in init(self, x, var_name, convert_dummies, drop_first, copy)
262 or is_datetime64_any_dtype(time_index.dtype)
263 ):
–> 264 raise ValueError(
265 “The index on the time dimension must be either ” “numeric or date-like”
266 )
ValueError: The index on the time dimension must be either numeric or date-like
No matter how hard I tried, I couldn’t deal with this error.
I was trying to apply Pedroni Panel Cointegration Analysis
Fatma Akpunar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.