General information 
Description 
Let us have N data points with coordinates x_{i}, y_{i}, z_{i}.The main purpose of this calculation is to obtain a relatively simple formula of data fitting z=f(x,y). We apply the generalized Pade functions for the approximation of data in the following form: 
where R(x, y), Q(x,y) are polynomial functions, R_{i} and Q_{i} are their values calculated at
ith point. Pade functions have the following advantages: 


You can find an excellent summary of properties of Pade functions here. 
Methodology 
The residual sum of squares (RSS) corresponding to (1) is the following 
Minimization of S_{0} leads to a system of nonlinear equations with respect to coefficients of polynomial functions, therefore the equation (1) is presented in the equivalent form 
with corresponding RSS 
This new form of RSS yields a system of linear equations.
This idea was efficiently used in paper [2] for 2D data fitting.
For the case of 3D regression analysis we use the following approximation
R(x)=a_{0}+ a_{1}x+ a_{2}y+ a_{3}x^{2}+ a_{4}xy+ a_{5}y^{2}
and Q(x)=b_{1}x+ b_{2}y+ b_{3}x^{2}+ b_{4}xy+ b_{5}y^{2}
if N>11. In this case we have 11 free parameters defined in the calculation by minimization of S_{1}
solving the corresponding linear equations.
In addition we try substitutions X=x^{qx}, Y=y^{qy}, X=exp(ex*x), and Y=exp(ey*y. These four parameters (qx, qy, ex, ey) are calculated by minimizing S_{0}. In all cases we check if the denominator is equal to 0 in the given domain [min{x_{i}}, max{x_{i}}] for variable x and [min{y_{i}}, max{y_{i}}] for y. We discard this solution if it is happened. If N<12 the polynomials are reduced to the form R(x)=a_{0}+ a_{1}x+ a_{2}y and Q(x)=b_{1}x+ b_{2}y 
Standard deviation SD is calculated 
as well as maximum local error 
We suppose that this calculation will be useful for researchers and engineers looking for good approximation of data with simple formula. To check the efficiency of suggested calculation, please see examples. 
References 
