Dear Statalist. I was wondering how to know what intial value to enter when doing a piecewise regression? After a lot of testing i find that the c value that minimise the MSE is 28. However, this required a lot of effort. When entering a low value for example 5 I get a relativly high MS value, the MS value jumps up an down until I tested a c value of 28 which gave the optimal result. When I put a c value of more than 28 the MS increases again. Any suggestion on how to find the optimal value that minimse the MS more effectivly?
My command is: nl (KOSTBHG = SIZE*{b1} + (SIZE>{c})*( SIZE-{c})*{b2}), variables(SIZE) initial(b1 0 c 28 b2 0) noconstant
Related Posts with Piecewise regression
Threshold VAR - imposing restrictions and generating GIRFsDear Stata users, I am using threshold in Stata 15.1 in order to estimate a fiscal policy threshold…
ODBC / Access problem with Stata 16I can describe and query a database but am unable to load a table from Access using ODBC in Stata 16…
Non-linear relationshipHello, I have a quick question: In order to justify propensity score matching, I need to assume a n…
Group observations by Sequential DateHi, I need to group observations by participant_id where observations are date sequential (ie end_da…
Parallel trend assumption using leads and lagsI am running some robustness checks to my diff-in-diff specification. In particular, I am trying to …
Subscribe to:
Post Comments (Atom)
0 Response to Piecewise regression
Post a Comment