## Developing a Model Using Non-Linear Regression

Now that we have found a power function through the manual conversion of a linear regression, let’s try to create a non-linear regression that fits the data points most closely. Similar to before we will be solving for a power function. We will start with the formula

*M *= *k*m*a*+b

Where *M *is the claw mass, m is mass, *k* is the constant of proportionality, *a* is a constant exponent and b is the intercept. We can use Excel Solver to determine an equation that has the least difference2, between measured claw mass and expected claw mass, resulting in the best fit equation. We begin with simple numbers:

k | b | a | Mass (g) | Claw Mass (g) | Expected Claw Mass (g) | Difference | Difference^2 |

100 | 100 | 0.05 | 4.74516 | 0.303208 | 208.0967267 | 207.793519 | 43178.1464 |

10.4439 | 1.15915 | 212.4457732 | 211.286623 | 44642.03716 | |||

14.1628 | 1.24838 | 214.1714341 | 212.923054 | 45336.22695 | |||

18.8073 | 1.65723 | 215.80207 | 214.14484 | 45858.0125 | |||

23.2829 | 2.65709 | 217.0447272 | 214.387637 | 45962.05897 | |||

29.0201 | 3.14769 | 218.3409211 | 215.193231 | 46308.12671 | |||

33.2396 | 2.82348 | 219.1469116 | 216.323432 | 46795.82705 | |||

37.577 | 5.27659 | 219.8798264 | 214.603236 | 46054.54906 | |||

42.7777 | 7.44482 | 220.6593195 | 213.214499 | 45460.42278 | |||

49.6655 | 5.50366 | 221.5633726 | 216.059713 | 46681.79943 | |||

sum= | 456277.207 |

Table 4: Expected Claw mass values (g) vs. actual values (g) using formula* M *= *k*m*a*+b with variables *k*=100, b=100, and a=0.05.

Looking at the difference sum we can conclude that these values are not a good fit. To find the best fit we can use Excel Solver. These are the values that will produce a minimum value for the sum of the difference squared of expected claw mass and actual claw mass.

k | b | a | Mass (g) | Claw Mass (g) | Expected Claw Mass (g) | Difference | Difference^2 |

0.045036389 | 0 | 1.280381226 | 4.74516 | 0.303208 | 0.33069107 | 0.02748307 | 0.000755319 |

10.4439 | 1.15915 | 0.908021728 | -0.2511283 | 0.063065409 | |||

14.1628 | 1.24838 | 1.341137439 | 0.09275744 | 0.008603942 | |||

18.8073 | 1.65723 | 1.92835606 | 0.27112606 | 0.07350934 | |||

23.2829 | 2.65709 | 2.534499239 | -0.1225908 | 0.015028495 | |||

29.0201 | 3.14769 | 3.36028241 | 0.21259241 | 0.045195533 | |||

33.2396 | 2.82348 | 3.998186665 | 1.17470667 | 1.379935749 | |||

37.577 | 5.27659 | 4.678043514 | -0.5985465 | 0.358257896 | |||

42.7777 | 7.44482 | 5.522601866 | -1.9222181 | 3.694922556 | |||

49.6655 | 5.50366 | 6.685906539 | 1.18224654 | 1.397706879 | |||

sum= | 7.03698112 |

Table 4: Expected Claw mass values (g) vs. actual values (g), using formula* M *= *k*m*a*+b after using Excel Solver resulting in variables *k*=0.045036389, b=0, and a=1.280381226.

Using the results Excel Solver calculated we can now put into equation form.

y = 0.045036389x1.280381226

Now to make it in terms of *R**D *we just add our *p *constant.

y = 0.045036389*p*x1.280381226

We can compare this to the equation we derived from our linear regression.

y = .04557*p*x*1*.2698

Non-Linear | Linear | |

Difference^2 | Difference^2 | |

0.0007553 | 0.000672536 | |

0.0630654 | 0.069114543 | |

0.0086039 | 0.005052793 | |

0.0735093 | 0.054907784 | |

0.0150285 | 0.031177036 | |

0.0451955 | 0.017787397 | |

1.3799357 | 1.155282315 | |

0.3582579 | 0.520287539 | |

3.6949226 | 4.303614145 | |

1.3977069 | 0.975366204 | |

sum= | 7.0369811 | 7.133262291 |

Table 5: Squared differences of linear and nonlinear derived formula, between expected claw mass and actual claw mass. Also includes sum of squared differences.

Comparing the sums of the squared differences show how similar they are which is expected because our results very closely resembled a linear equation. There was a slight concavity meaning a power function would fit best.

Testing Model

Now that we have derived a simple model we can begin adding more parameters. The first model we should check are bounds. Although our model seems like a fit compared to our experimental values we need to determine when a fiddler crab will stop fitting our model. Our equation is a power function so the incremental increases will not be the same, so we can use the ratio of mass of the crab to the claw mass to determine when our model is not viable. The smaller the ratio the more likely our model doesn’t fit. We can make an assumption that the male fiddler crab will not be able walk with a claw that 33% of its body weight or a ratio of 3. We can plot points to determine when the model we have will not fit.

Mass (g) | Claw Mass (g) | Total Mass (g) | Percentage of Mass |

1 | 0.04557 | 1.04557 | 4.358388248 |

10 | 0.848162425 | 10.84816242 | 7.81848936 |

100 | 15.7862519 | 115.7862519 | 13.63396055 |

200 | 38.06509492 | 238.0650949 | 15.98936414 |

500 | 121.851573 | 621.851573 | 19.59496097 |

1000 | 293.8184265 | 1293.818426 | 22.70940191 |

1600 | 533.6672877 | 2133.667288 | 25.01173874 |

2500 | 940.5529537 | 3440.552954 | 27.33726137 |

3700 | 1547.325126 | 5247.325126 | 29.48788361 |

6790 | 3344.931805 | 10134.9318 | 33.00398926 |

Table 6: Claw mass from derived equation and percentage of total mass.

We can develop a model that will tell us how big a claw size can be for each individual fish before tipping size based on our assumption that the claw cannot be 33% of the total weight. We set claw size = .(1/3)(mass + claw size) and solve for claw size:

claw size = (3/2*mass)/3

Allometry is a useful tool that can be used in virtually any field. The ability to develop patterns no matter how many data points you have, or how different they may seem, is a very useful tool. Although we have only done basic model building here, once we have created the model, we can easily expand upon it. For example, in the first case we can add a lower bound as well by just developing an equation for claw mass that will not let us know when it becomes too small. Deriving proportional models is a useful tool.