Dear Stata Users

My data is in panle format (firm, time). I need to estimate piesewise linear regression which unables to estimate two diffrent regression coefficients for a past return variable (ret, t-1).One estimated slope should refer to the segment above median past return (Winner), whereas the other slope referes to the segment below the median (Loser). Also I need to compute t-stat with two way clustered standard errors (firm and time).

Regression: Flow j, t = Alpha+ Beta1 Ret j, t-1(Winner, above past cross-sectional return) + Beta2 Ret j, t-1 (Loser, below past cross-sectional median)+Error j,t

Is there any specific Stata regression command which can execute the above equation?

P.S. I have tried to create two sepate variables for Winner and Loser, but when i ran regress :
Code:
regress Flow Winner Loser, vce(cluster double_cluster)
I get the following error: no observations r(2000);

Thank you.