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
Error terms for Time Series Regression with a Panel VariableDear all, For my master thesis, I would like as a first step to run a Fama-French three factor regr…
Calculation of standard errors after predictive margins: how are they computed?Hello, I'm struggling how standard errors after -margins- are calculated, e.g. after -logit-. I am …
jackknife loop with wrong number of observationsforvalues i = 1/139 { reg fawtd fdistockgdp if seqnum != `i', robust outreg2 using table, append e…
How to change display of scientific notation of summary statistics to nummeric?Stata 15.1 I am attempting to create a descriptive statistics table for my thesis. However, I found…
Interpreting a non-linear relationship with predicted values and margins plot I am trying to interpret a non-linear relationship in a fixed effects model. Attached is my Stata …
Subscribe to:
Post Comments (Atom)
0 Response to Piecewise regression
Post a Comment