Does any one know a way to estimate a piecewise linear regression with instrument variable(s)?

I have a model below,

y = a + b*Xabovezero + c*Xbelowzero + control variables + error term.

where Xabovezero = X if X>0, and zero otherwise, and Xbelowzero=X if X<0, and zero otherwise.

In the event that X is endogenous, I want to use an instrument variable K. I wonder how to do it properly in stata. I found a paper discussing it https://www.dbmi.pitt.edu/sites/defa...s/Scheines.pdf but have not found stata ado files.

Any help is appreciated!