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
Related Posts with Piecewise regression
Plot log outcome on predicted propensity of TreatmentHey, I would like to draw a graph like the one below. How to i do that? The one in the bottom i hav…
Interpretation of the margins plot with categorical variablesHello every one, Iam having trouble interpreting a margins plot and the margins output as well whiil…
Hosmer–Lemeshow test for large data setsHosmer–Lemeshow test for large data sets gives low p value despite perfectly fitting model. Increasi…
Finite mixture model vs. Latent class modelHi scholars, Would you please explain the difference between Finite mixture model and Latent class …
Generating unique ID variable from numeric and categorical variablesHello all, I am new to forum and I have a question about generating new IDs. Thanks for your patienc…
Subscribe to:
Post Comments (Atom)
0 Response to Piecewise regression
Post a Comment