I’m trying to translate a python patsy model into the correct STAN syntax.
This is a piecewise linear model with known knot points and some variables with multiple cut points.
The patsy syntax is:
"y ~ x1 + bs(np.clip(x2_model, 0, np.inf), df = 1, degree = 1) + x3 + minorvio_model + bs(x4, df = 1, degree = 1) + bs(np.clip(x5, 0 , 10000), df = 1, degree) + bs(np.clip(x5, 10000, np.inf), df = 1, degree =1).
I’m not sure what the STAN syntax would be.