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
can we set history window and variable window appear at the same time for Stata Maccan we set history window and variable window appear at the same time for Stata Mac? Every time I ne…
interaction term in regressionHello everybody, I have a question regarding regression's (statistical) interpretation with an inte…
Sensitivity Analysis for Causal Mediation with Interacted Independent VariableHello! I am conducting a causal mediation analysis in which treatment --> mediator --> outcome…
How to reproduce fracreg with gsemDear Statalisters, I have a question about how to reproduce the results of fracreg with the probit …
Proportion test for multiple groupsHi, I want to compare how does use of drug "A" differs across age categories. Total drug A users w…
Subscribe to:
Post Comments (Atom)
0 Response to Piecewise regression
Post a Comment