# Which kind(s) of curves should I use to fit these data?

As shown in the graph above, I have a Response variable dependent on TWO covariates, COV1 and COV2.

Which type(s) of equation should I use to fit the data? It seems that:

1. there is an intercept at (COV1=0.5, Response=0.5),
2. There is an exponential relationship between Response and COV1, and
3. As COV2 increases (approaches infinity), Response and COV1 approach identity.

While these relationships seem obvious, I am not sure what equations should I use. Any help is appreciated!

========================================

Just in case, below are the data for reference:

COV1\COV2,COV2=0.45555,COV2=1.3942,COV2=2.55655,COV2=4.1488,COV2=6.1699,COV2=9.558,COV2=15.182,COV2=25.3935,COV2=45.982,COV2=60+ 0.505,0.511,0.485,0.509,0.497,0.488,0.509,0.51,0.499,0.516,0.52 0.515,0.499,0.519,0.508,0.494,0.532,0.482,0.548,0.523,0.502,0.528 0.525,0.503,0.519,0.497,0.507,0.512,0.512,0.532,0.511,0.54,0.503 0.535,0.52,0.518,0.517,0.532,0.505,0.536,0.524,0.549,0.543,0.505 0.545,0.522,0.519,0.526,0.537,0.522,0.526,0.548,0.529,0.541,0.537 0.555,0.51,0.529,0.526,0.534,0.542,0.555,0.555,0.576,0.531,0.591 0.565,0.515,0.522,0.53,0.556,0.542,0.553,0.57,0.573,0.57,0.575 0.575,0.525,0.549,0.539,0.546,0.559,0.561,0.556,0.574,0.578,0.562 0.585,0.518,0.557,0.55,0.562,0.56,0.575,0.581,0.582,0.603,0.582 0.595,0.508,0.541,0.562,0.547,0.585,0.583,0.557,0.578,0.605,0.593 0.605,0.533,0.531,0.55,0.573,0.563,0.559,0.606,0.597,0.595,0.602 0.615,0.516,0.56,0.577,0.584,0.574,0.585,0.578,0.596,0.602,0.602 0.625,0.527,0.569,0.569,0.576,0.571,0.596,0.621,0.621,0.609,0.635 0.635,0.53,0.577,0.573,0.586,0.595,0.619,0.604,0.621,0.603,0.627 0.645,0.52,0.559,0.56,0.601,0.62,0.597,0.614,0.623,0.629,0.642 0.655,0.527,0.56,0.568,0.589,0.608,0.608,0.627,0.647,0.644,0.623 0.665,0.537,0.592,0.593,0.608,0.619,0.625,0.642,0.638,0.646,0.605 0.675,0.539,0.59,0.604,0.598,0.634,0.634,0.649,0.645,0.64,0.651 0.685,0.55,0.598,0.599,0.593,0.636,0.649,0.662,0.647,0.682,0.721 0.695,0.541,0.594,0.6,0.614,0.62,0.648,0.676,0.685,0.643,0.666 0.705,0.564,0.601,0.597,0.623,0.653,0.688,0.644,0.661,0.67,0.716 0.715,0.569,0.607,0.639,0.625,0.665,0.691,0.691,0.683,0.705,0.705 0.725,0.554,0.607,0.611,0.627,0.666,0.67,0.681,0.712,0.682,0.726 0.735,0.569,0.615,0.634,0.637,0.658,0.694,0.699,0.721,0.714,0.699 0.745,0.567,0.613,0.627,0.646,0.66,0.694,0.708,0.708,0.72,0.724 0.755,0.568,0.614,0.654,0.656,0.667,0.714,0.729,0.737,0.731,0.752 0.765,0.574,0.629,0.65,0.666,0.688,0.711,0.734,0.726,0.742,0.733 0.775,0.574,0.625,0.656,0.665,0.7,0.713,0.732,0.761,0.761,0.777 0.785,0.588,0.643,0.653,0.69,0.685,0.713,0.75,0.781,0.764,0.772 0.795,0.597,0.648,0.649,0.667,0.714,0.737,0.76,0.765,0.776,0.784 0.805,0.613,0.651,0.668,0.686,0.721,0.742,0.757,0.772,0.786,0.802 0.815,0.628,0.649,0.659,0.701,0.723,0.755,0.773,0.794,0.786,0.794 0.825,0.626,0.659,0.681,0.716,0.721,0.753,0.785,0.794,0.793,0.797 0.835,0.605,0.658,0.686,0.711,0.743,0.77,0.804,0.814,0.815,0.8 0.845,0.605,0.668,0.692,0.723,0.741,0.777,0.799,0.813,0.818,0.825 0.855,0.632,0.673,0.715,0.726,0.756,0.793,0.823,0.815,0.827,0.837 0.865,0.631,0.696,0.707,0.726,0.769,0.787,0.818,0.829,0.85,0.862 0.875,0.628,0.697,0.717,0.738,0.777,0.807,0.834,0.849,0.855,0.866 0.885,0.632,0.704,0.725,0.749,0.797,0.82,0.838,0.849,0.863,0.869 0.895,0.639,0.709,0.735,0.758,0.798,0.829,0.855,0.865,0.869,0.891 0.905,0.672,0.705,0.74,0.773,0.795,0.838,0.864,0.88,0.882,0.888 0.915,0.682,0.728,0.751,0.768,0.821,0.861,0.869,0.885,0.894,0.891 0.925,0.692,0.726,0.762,0.788,0.82,0.863,0.886,0.9,0.906,0.921 0.935,0.686,0.741,0.765,0.796,0.842,0.878,0.899,0.912,0.915,0.916 0.945,0.696,0.746,0.773,0.812,0.848,0.887,0.907,0.92,0.921,0.929 0.955,0.705,0.761,0.79,0.821,0.864,0.898,0.926,0.932,0.939,0.942 0.965,0.721,0.769,0.798,0.836,0.875,0.912,0.938,0.946,0.953,0.955 0.975,0.734,0.777,0.813,0.851,0.892,0.922,0.95,0.959,0.963,0.968 0.985,0.729,0.783,0.824,0.869,0.904,0.945,0.965,0.972,0.975,0.979 0.995,0.766,0.784,0.837,0.89,0.921,0.969,0.989,0.996,0.998,0.999

Clarifying data structure:

Except for the first column and the header row, all values are the response variable values. The first column stands for COV1, The first row are COV2 values (I did binning so they looks like categorical).

Two examples to confirm this:

• (3,3) is 0.519 and it stands for (COV1=0.515, COV2=1.3942, Response=0.519)

• There is a total of 50rows*10cols=500 observations

I sort of tried to collapse the data structure to avoid a long table.

• I apologize for seeming dense, but the format of the data you have posted is not clear to me - for example, I do not see the response variable values. Would you please clarify the data format? Nov 25, 2017 at 18:19
• @James sure no problems. I have made some edits at the end of the post. Nov 25, 2017 at 23:34

## 1 Answer

I found a simple 3D equation which seems to fit the data OK, see the fit statistics and plots below:

RESPONSE = a * pow(COV1,b) * pow(COV2,c) + Offset

Fitting target of lowest sum of squared absolute error = 1.8543607159602271E-01

a =  4.0413817880641145E-01
b =  2.1288567847542117E+00
c =  1.1402362202705651E-01
Offset =  3.9389973053280164E-01

Degrees of freedom (error): 496
Degrees of freedom (regression): 3
Chi-squared: 0.185436071596
R-squared: 0.977117468553
R-squared adjusted: 0.976979066145
Model F-statistic: 7059.97448336
Model F-statistic p-value: 1.11022302463e-16
Model log-likelihood: 1265.44402896
AIC: -5.04577611586
BIC: -5.01205925107
Root Mean Squared Error (RMSE): 0.0192580410009

a = 4.0413817880641145E-01
std err: 8.90339E-05
t-stat: 4.28304E+01
p-stat: 0.00000E+00
95% confidence intervals: [3.85599E-01, 4.22677E-01]

b = 2.1288567847542117E+00
std err: 4.82677E-03
t-stat: 3.06421E+01
p-stat: 0.00000E+00
95% confidence intervals: [1.99236E+00, 2.26536E+00]

c = 1.1402362202705651E-01
std err: 1.37609E-05
t-stat: 3.07377E+01
p-stat: 0.00000E+00
95% confidence intervals: [1.06735E-01, 1.21312E-01]

Offset = 3.9389973053280164E-01
std err: 8.24229E-05
t-stat: 4.33872E+01
p-stat: 0.00000E+00
95% confidence intervals: [3.76062E-01, 4.11737E-01]

Coefficient Covariance Matrix
[ 0.23814578 -1.56881454 -0.08653843 -0.22041239]
[ -1.56881454  12.91052887   0.5625304    1.62939511]
[-0.08653843  0.5625304   0.03680734  0.0761123 ]
[-0.22041239  1.62939511  0.0761123   0.22046276]


• Please mention the software you used. Nov 26, 2017 at 11:49
• The software I used was my online curve and surface fitter at zunzun.com - I used the "3D Function Finder" to do the equation search. Nov 26, 2017 at 11:55
• @JamesPhillips Thank you very much! Let me look into your solution first Nov 27, 2017 at 2:13