Panel regression is a technique to merge longitudinal and cross sectional data together in a linear model. Linear model doesnt work well since by bringing time series features into the model, it can suffer from heteroskedastcity. Panel regression solves this.
My question is whether XGBoost can solve all these problems without any linearity assumptions or ensuring the data is homoskedastcitic.
Say the input data is as follows:
User A -> Time series of y_A , demographic features X_A, time series of weather temperature of location A W_A
User B -> Time series of y_B , demographic features X_B, time series of weather temperature of location B W_B
... all other users
I can then transform this cross sectional and longitudinal data into the following training feature matrix:
User_A , y_A(t-1),X_A, W_A(t-1) LABEL = y_A(t)
User_A , y_A(t-2),X_A, W_A(t-2) LABEL = y_A(t-1)
User_A , y_A(t-3),X_A, W_A(t-3) LABEL = y_A(t-2)
... all other time series of user A
User_B , y_B(t-1),X_B, W_B(t-1) LABEL = y_B(t)
User_B , y_B(t-2),X_B, W_B(t-2) LABEL = y_B(t-1)
User_B , y_B(t-3),X_B, W_B(t-3) LABEL = y_B(t-2)
... all other time series of user B
... all other users
Now, that we have transformed the data into a standard regression feature matrix, we can train a user level XGboost model and then use this to forecast the future as well using all the features. Does this make sense to do? Are there any limitations of this approach? I dont need to worry about stationarity since its a non linear model.