R^{2}
application calculate the linear fit of plotted CSDs ( Crystal Size Distribution ) by applying the ordinary
least squares fit method, considering as raw data the data in the ln[n(L)], L space. The method of
least squares assumes that the best-fit curve of a given type is the curve that
has the minimum sum of deviations squared from a given set of data. Let (*x*_{i},*y*_{i}) be the *n*
points representing our input data, where *x* is the independent
variable, i.e., the sampled diameter *L*,
and *y* is the dependent
variable, i.e., ln[n(*L*)]. We sought a
linear function *f(x)=mx+q*, where *m* and *q* are the adjustable
parameters we wish to determine and which, in turn, best approximate our data
points. According to the ordinary least squares method, the best fitting curve
is determined by minimization of the sum *S* of squared residuals. The quality of the fit
was assessed using the coefficient of R^{2} determination, which can be used as an indicator of how well a
line fits the data points. Note that 0≤ R^{2}≤1 and an R^{2} equal to 1 indicates that the regression line fits the data
perfectly. The R^{2} is calculated for all
possible linear fit of the CSDs. The R^{2} distribution for each
sample is then presented as a grid of R^{2} values Please if you use this
application in scientific publication and/or congress posters and oral
presentation cite:
Fornaciai A., C.
Perinelli, P. Armienti, M. Favalli, (2015) Crystal size distributions of
plagioclase in lavas from the July-August 2001 Mount Etna eruption. Bulletin of
Volcanology 77:70. DOI 10.1007/s00445-015-0953-8 http://link.springer.com/article/10.1007%2Fs00445-015-0953-8
**Instructions**
1) Prepare the input txt
file containing the following information (as an example)
# l ln
2.24 -6.62
1.78 -5.1
1.42 -3.82
...
the # at the first line
is mandatory (for the processing software to skip the line) or alternatively
the first line can be missing:
2.24 -6.62
1.78 -5.1
1.42 -3.82
...
2) Save the input file
as “input.txt”
3) Compile the form and
upload the file (link is below)
4) Download the output
at the link provided in the e-mail the system will send to you.
**Output data** ** **output_plot.png Plots of crystal
size distributions. Vertical axis represents the natural logarithm of the
population density, horizontal axis crystal size
output_R2_cut_at_0.XX.png
Distribution of the square of the correlation coefficient (R^{2})
between the dependent variable ln[n(*L*)],
representing the natural logarithm of the population density, and the
independent variable *L* for simple
linear regression.
R^{2} indicates
how closely the CSD data points fit the regression line. R^{2} equal to
1 indicates that the regression line fits the data perfectly. X and Y are the
first and the last node of the interval for which the R^{2 }is
calculated. Node count starts from 0.
0.XX is the lower
threshold value in plot legend. To make the R^{2} diagrams images more readable,
we have removed the original pixelation by linear interpolation to a higher
resolution.
Users’ comments and
suggestion how to improve this help and the R^{2 }web-application are
particularly welcome. Team:
Alessandro Fornaciai
alessandro.fornaciai(at)ingv.it , Massimiliano Favalli
massimiliano.favalli(at)ingv.it , Luca Nannipieri
luca.nannipieri(at)ingv.it GO TO ==> R^{2} APPLICATION FORM |