Niget: NanoIndentation General Evaluation Tool

Appendix A Data fitting

We use types of data fitting: the Deming fit for straight lines, the least squares fit of the 3/2 power and orthogonal distance regression [2] for power law functions.

A.1 Orthogonal distance regression

Orthogonal distance regression, also called generalized least squares regression, errors-in-variables models or measurement error models, attempts to tries to find the best fit taking into account errors in both x- and y- values. Assuming the relationship

y*=f(x*;β) (60)

where β are parameters and x* and y* are the “true” values, without error, this leads to a minimization of the sum

minβ,δi=1n[(yi-f(xi+δ;β))2+δi2] (61)

which can be interpreted as the sum of orthogonal distances from the data points (xi,yi) to the curve y=f(x,β). It can be rewritten as

minβ,δ,εi=1n[εi2+δi2] (62)

subject to

yi+εi=f(xi+δi;β). (63)

This can be generalized to accomodate different weights for the datapoints and to higher dimensions


where ε and δ are m and n dimensional vectors and wε and wδ are symmetric, positive diagonal matrices. Usually the inverse uncertainties of the data points are chosen as weights. We use the implementation ODRPACK [2].

There are different estimates of the covariance matrix of the fitted parameters β. Most of them are based on the linearization method which assumes that the nonlinear function can be adequately approximated at the solution by a linear model. Here, we use an approximation where the covariance matrix associated with the parameter estimates is based (JTJ)-1, where J is the Jacobian matrix of the x and y residuals, weighted by the triangular matrix of the Cholesky factorization of the covariance matrix associated with the experimental data. ODRPACK uses the following implementation [1]

V^=σ^2[i=1nf(xi+δi;β)βTwεi2f(xi+δi;β)β+f(xi+δi;β)δTwδi2f(xi+δi;β)δ] (64)

The residual variance σ^2 is estimated as

σ^2=1n-pi=1n[(yi-f(xi+δ;β))Twεi2(yi-f(xi+δ;β))+δiTwδi2δi] (65)

where βp and δim,i=1,,n are the optimized parameters,

A.2 Total least squares - Deming fit

The Deming fit is a special case of orthogonal regression which can be solved analytically. It seeks the best fit to a linear relationship between the x- and y-values

y*=ax*+b, (66)

by minimizing the weighted sum of (orthogonal) distances of datapoints from the curve


with respect to the parameters a, b, and xi*. The weights are the variances of the errors in the x-variable (ση2) and the y-variable (σϵ2). It is not necessary to know the variances themselves, it is sufficient to know their ratio

δ=σϵ2ση2. (67)

The solution is

a = 12sxy[syy-δsxx±(syy-δsxx)2+4δsxy2] (68)
b = y¯-ax¯ (69)
xi* =  xi+aδ+a2(yi-b-axi), (70)


x¯ = 1ni=1nxi (71)
y¯ = 1ni=1nyi (72)
sxx = 1ni=1n(xi-x¯)2 (73)
syy = 1ni=1n(yi-y¯)2 (74)
sxy = 1ni=1n(xi-x¯)(yi-y¯). (75)

A.3 Least squares - 3/2 power fit

We seek the best fit

y=ax3/2+b, (76)

by minimizing the sum of (vertical) distances of datapoints from the curve


with respect to the parameters a, b. The solution is

a = x3/2y¯-x3/2¯y¯x3¯-(x3/2¯)2 (77)
b = y¯-ax3/2¯ (78)


x3/2y¯ = 1ni=1nxi3/2yi (79)
x3/2¯ = 1ni=1nxi3/2 (80)
x3¯ = 1ni=1nxi3 (81)
y¯ = 1ni=1nyi (82)