Regression Analysis - Constructing a model with constraints (Need help please)
Regression Analysis - Constructing a model with constraints (Need help please)
(OP)
Hello,
I am trying to construct a general function/method based on two sets of minimum/maximum data point constraints, which can take on new values in different situations. The only known data for this general function is the starting point (y-axis intercept) and the x-range. The rate of change over time must equal zero, so the amount increased/decreased must be compensated within the x-range. Optimally will vary as little as possible, as long as it meets the constraints.
I attached a figure of an example plot. The minimum constraint data points are marked as the 'necessary' function. The maximum constraint data points are marked as 'maximal.' The function marked as 'case 2' is an example of the general function in question that would satisfy the constraints.
I would appreciate any advice or suggestions on how to approach this problem as I've had very little success so far. Thank you in advance.
I am trying to construct a general function/method based on two sets of minimum/maximum data point constraints, which can take on new values in different situations. The only known data for this general function is the starting point (y-axis intercept) and the x-range. The rate of change over time must equal zero, so the amount increased/decreased must be compensated within the x-range. Optimally will vary as little as possible, as long as it meets the constraints.
I attached a figure of an example plot. The minimum constraint data points are marked as the 'necessary' function. The maximum constraint data points are marked as 'maximal.' The function marked as 'case 2' is an example of the general function in question that would satisfy the constraints.
I would appreciate any advice or suggestions on how to approach this problem as I've had very little success so far. Thank you in advance.





RE: Regression Analysis - Constructing a model with constraints (Need help please)
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: Regression Analysis - Constructing a model with constraints (Need help please)
Here is the link I used:
http://i61.tinypic.com/so0qx1.jpg
RE: Regression Analysis - Constructing a model with constraints (Need help please)
This seems like statistics problem, for which there is a better place to post this question: forum962: Statistics in engineering If you agree, you should red flag this posting and re-post in forum962: Statistics in engineering
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: Regression Analysis - Constructing a model with constraints (Need help please)
div=0
for i in x range
f(x) = min(x) > (f(0)-div) ? min(x) : max(x) < (f(0)-div) ? max(x) : f(0)-div
div += f(x)-f(0)
end for
?
I've assumed by "rate of change over time must equal zero" you mean the integral of the f(x) - f(0) must tend towards zero. If you really did mean the rate of change, then adjust accordingly.
RE: Regression Analysis - Constructing a model with constraints (Need help please)
RE: Regression Analysis - Constructing a model with constraints (Need help please)
No need to worry about learning C at this stage. The ternary operator is simply this:
test ? a : b;
is equivalent to this psuedocode:
if (test)
Just note that the b statement in my code is actually another test.