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
statistical analysis on two-eye datasetHi everyone, I am very new to stata and I am trying to do an analysis with both eyes of one individu…
Duplicates - keep first and sometimes second...Hello I am working with a large dataset in Stata with 40,000 stroke patients admitted to a hospital…
xtset and xtreg with all coefficients zeroHi everyone, I am new to using panel data on stata so I had a few questions. I am using the India …
Testing robustnessHello, I'm writing my thesis on the effect of nationality diversity on firm performance. I'm using …
reghdfe: saving fixed effect + its standard errorHi everyone, I am estimating a triple Difference-in-Differences model in STATA to analyse the effe…
Subscribe to:
Post Comments (Atom)
0 Response to Piecewise regression
Post a Comment