Python Forum
help seeking for prediction of fixed effect model
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help seeking for prediction of fixed effect model
#1
now i get a formula by FE MODEL, but i wanna use it to predict the upper and lower bound of 'Y'
however, it seems that the i could not predict if based on the orginial data by commands like 'get_prediction'
because this command is for OLS, not for the panel data or panel model
if i solve it by Stata, i just need to use "predict" and it will ouput the prediction directly
so are there any other commands for my demand QAQ Heart !!!

This is my code:

filtered_df['Y_winsorized'] = winsorize(filtered_df['Y'], limits=[0.2, 0.2])

filtered_df = filtered_df.set_index(["material","date"])
exog = sm.add_constant(filtered_df[['X1','X2']])
result = PanelOLS(filtered_df['Y_winsorized'], exog, entity_effects=True, time_effects=True)
result = result.fit()
print(result)

pred = result.get_prediction(exog)
conf_int = pred.conf_int()  
pred_int = pred.conf_int(observed=True)  
this is the warning and error:
Error:
AttributeError: 'PanelEffectsResults' object has no attribute 'get_prediction'
Larz60+ write Jun-18-2024, 08:03 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
I have added tags for you this time. Please use BBCode tags on future posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Copying methods to effect the new owner instead of the old instance Daniel285 2 1,007 Jun-03-2024, 07:58 AM
Last Post: Gribouillis
  Win or Loss Prediction ksasi2k3 4 1,474 Apr-25-2024, 01:46 PM
Last Post: ksasi2k3
  model.fit and model.predict errors hatflyer 6 4,801 Nov-10-2023, 01:39 AM
Last Post: hatflyer
  Printing effect sizes for variables in an anova eyavuz21 2 1,718 Feb-01-2023, 02:12 PM
Last Post: eyavuz21
  Help with TypeWriter Effect in Python Rich Extra 0 1,920 May-23-2022, 09:44 PM
Last Post: Extra
  hyperparameters do not make a difference in prediction jenya56 0 1,419 Sep-15-2021, 12:53 PM
Last Post: jenya56
  FileNotFoundError: [Errno 2] No such file or directory: 'model/doc2vec.model/Articles Anldra12 10 9,299 Jun-11-2021, 04:48 PM
Last Post: snippsat
  Referencing a fixed cell Mark17 2 2,738 Dec-17-2020, 07:14 PM
Last Post: Mark17
  Rotation Effect on live Webcam Feed Leziiy 0 2,114 Sep-12-2020, 04:25 PM
Last Post: Leziiy
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 2,397 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020