Hello guys,
I am currently doing some research on forecast/prediction accuracy. My research design is straight-forward: I use two different models to predict a liquidity measure (out-of-sample). I use the previous 100 days to come up with a prediction for both models.
However, I want to predict for only one day per firm in my sample. Thus, I have 100 rows, with one observation for each firm. I have three variables: actual_liquidity, liquidity_pred1, liquidity_pred2. I want to use the Diebold Mariano test.
First, I wanted to use the following code:
dmariano liquidity liquidity_pred1 liquidity_pred2, crit(MSE)
But it resulted in the following error: "sample may not include multiple panels".
I used a work-around, but I am totally unsure whether this is a sensible approach, since it doesn't seem clean.
xtset, clear
gen ts_var = _n
tsset ts_var
dmariano liquidity liquidity_pred1 liquidity_pred2, crit(MSE)
As a sanity check, I variated the order of my observations before generating the ts_var, and it didn't change anything about the results.
I would be very grateful if somebody could help me with my issue.
Thank you in advance and best regards,
Jonathan
I am currently doing some research on forecast/prediction accuracy. My research design is straight-forward: I use two different models to predict a liquidity measure (out-of-sample). I use the previous 100 days to come up with a prediction for both models.
However, I want to predict for only one day per firm in my sample. Thus, I have 100 rows, with one observation for each firm. I have three variables: actual_liquidity, liquidity_pred1, liquidity_pred2. I want to use the Diebold Mariano test.
First, I wanted to use the following code:
dmariano liquidity liquidity_pred1 liquidity_pred2, crit(MSE)
But it resulted in the following error: "sample may not include multiple panels".
I used a work-around, but I am totally unsure whether this is a sensible approach, since it doesn't seem clean.
xtset, clear
gen ts_var = _n
tsset ts_var
dmariano liquidity liquidity_pred1 liquidity_pred2, crit(MSE)
As a sanity check, I variated the order of my observations before generating the ts_var, and it didn't change anything about the results.
I would be very grateful if somebody could help me with my issue.
Thank you in advance and best regards,
Jonathan
Comment