Dear stalist

I am running a piecewise regression. I want to use a dataset that contains two different years, 2016 and 2017. I will include a if function to tell STATA which year to run the regression on. However when i run the regression i get an error message saying: " starting values invalid or some RHS variables have missing values". Any ideas on how to solve this?

This is my function: nl (KOSTBHG = SIZE*{b1} + (SIZE>{c})*( SIZE-{c})*{b2} if Year==2017), variables(SIZE) initial(b1 0 c 0 b2 0) noconstant trace