Hello dear mathematicians,
I'm not entirely sure what to tag this question with since I'm new here but I hope some more experienced user can guide me. Here is my problem:
I'm using an internal software in which we use equations to calculate the value of an article. The value is calculated by a linear equation multiplied with up to 5 constants (or some might use addition instead of multiplication). Here is an example of an equation for the value of a bolt:
y=value x=length a=diameter b=material c=type, d=with or without nut
x is continuous, i.e the bolt can be 6.7mm, 15.3mm or whatever. a, b, c and d are categories and can only have specific values: a can be 4mm, 6mm or 8mm; b can be steel s1 or steel s2; c can be standard or professional; d can be with or without nut.
The way our software calculates the value is by the following equation:
y=(kx+m)*a*b*c+d
The way we retrieve the equation is by manually fitting the line to a lot of data with different values for these constants while knowing the price of the bolt. For example we see that a bolt with a nut usually cost ~$5 more than one without a bolt so we conclude that d is 5 since we just add d. To get b we compare the articles made out of material s1 to the ones made out of material s2 and we see that s1 cost ~1.2 times more so we set b to 1.2 for s1 and s2 to 1 since this is a factor we multiply the continuous equation with. And the same procedure for all the other constants.
If I would do a regression analysis out of all data I would instead get an equation which looks something like (my statistics is a bit rusty but i think it's like this):
y=kx1+ax2+bx3+cx4+dx5
Our software doesn't handle this kind of equations so my question is if I somehow could convert an regression equation in someway to the type of equation we use. It doesn't need to be perfect since the only thing I'm looking for is to get a rough line to start working from instead of having to set every parameter from the beginning. As you might suspect the manual fitting of these equations take quite some time so it would save alot of time, energy and frustration if I had a rough line to tune instead of beginning all over everytime.
We do most of the stuff in Excel and Visual Basic but the question is more of how to convert the equation than how to technically code the solution.
All help is appreciated, I asked the question on stackoverflow and they directed me here so I hope I am in good hands.
Thanks!