Difference between revisions of "NL/Documentation/How Tos/Calc: functie LIJNSCH"

From Apache OpenOffice Wiki
Jump to: navigation, search
(See also:)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
  
== LINEST ==
+
== LIJNSCH ==
Returns a table of statistics for a straight line that best fits a data set.
+
Geeft een tabel met statistieken terug voor een rechte lijn die het beste past voor een gegevensverzameling.
  
=== Syntax: ===
+
=== Syntaxis: ===
<tt>'''LINEST(yvalues; xvalues; allow_const; stats)'''</tt>
+
<tt>'''LIJNSCH(GegevensY; GegevensX; Lineairtype; Statistieken)'''</tt>
: <tt>'''yvalues'''</tt> is a single row or column range specifying the <i>y</i> coordinates in a set of data points.  
+
: <tt>'''GegevensY'''</tt> is een bereik van één enkele rij of kolom die de <i>Y</i>-coördinaten specificeert in een verzameling gegevenspunten.  
  
: <tt>'''xvalues'''</tt> is a corresponding single row or column range specifying the <i>x</i> coordinates. If <tt>'''xvalues'''</tt> is omitted it defaults to <tt>'''1, 2, 3, ..., n'''</tt>. If there is more than one set of variables <tt>'''xvalues'''</tt> may be a range with corresponding multiple rows or columns.
+
: <tt>'''GegevensX'''</tt> is een corresponderend bereik van één enkele rij of kolom die de <i>X</i>-coördinaten specificeert. Als <tt>'''GegevensX'''</tt> wordt weggelaten wordt als standaard <tt>'''1, 2, 3, ..., n'''</tt> ingevuld. Als er meer dan één verzameling variabelen is, mag <tt>'''GegevensX'''</tt> een bereik zijn met overeenkomende meerdere rijen of kolommen.
  
: <tt>'''LINEST'''</tt> finds a straight line ''y'' = ''a'' + ''bx'' that best fits the data, using linear regression (the "least squares" method). With more than one set of variables the straight line is of the form ''y'' = ''a'' + ''b<sub>1</sub>x<sub>1</sub>'' + ''b<sub>2</sub>x<sub>2</sub>'' ... + ''b<sub>n</sub>x<sub>n</sub>''.
+
: <tt>'''LIJNSCH'''</tt> finds a straight line ''y'' = ''a'' + ''bx'' that best fits the data, using linear regression (the "least squares" method). With more than one set of variables the straight line is of the form ''y'' = ''a'' + ''b<sub>1</sub>x<sub>1</sub>'' + ''b<sub>2</sub>x<sub>2</sub>'' ... + ''b<sub>n</sub>x<sub>n</sub>''.
  
 
: if <tt>'''allow_const'''</tt> is <tt>'''FALSE'''</tt> the straight line found is forced to pass through the origin (the constant ''a'' is zero; ''y'' = ''bx''). If omitted, <tt>'''allow_const'''</tt> defaults to <tt>'''TRUE'''</tt> (the line is not forced through the origin).
 
: if <tt>'''allow_const'''</tt> is <tt>'''FALSE'''</tt> the straight line found is forced to pass through the origin (the constant ''a'' is zero; ''y'' = ''bx''). If omitted, <tt>'''allow_const'''</tt> defaults to <tt>'''TRUE'''</tt> (the line is not forced through the origin).
  
: <tt>'''LINEST'''</tt> returns a table (array) of statistics as below and must be entered as an [[Documentation/How_Tos/Using Arrays|array formula]] (for example by using '''Cntrl-Shift-Enter''' rather than just '''Enter''')
+
: <tt>'''LIJNSCH '''</tt> returns a table (array) of statistics as below and must be entered as an [[Documentation/How_Tos/Using Arrays|array formula]] (for example by using '''Cntrl-Shift-Enter''' rather than just '''Enter''')
  
 
: If <tt>'''stats'''</tt> is omitted or <tt>'''FALSE'''</tt> only the top line of the statistics table is returned. If <tt>'''TRUE'''</tt> the entire table is returned.
 
: If <tt>'''stats'''</tt> is omitted or <tt>'''FALSE'''</tt> only the top line of the statistics table is returned. If <tt>'''TRUE'''</tt> the entire table is returned.
Line 37: Line 37:
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
:In the example above, cells A2:B8 contain the ''x'',''y'' values for a set of points. <tt>'''LINEST(B2:B8;A2:A8;1;1)'''</tt> returns the statistics for the best fit line through those points.
+
:In the example above, cells A2:B8 contain the ''x'',''y'' values for a set of points. <tt>'''LIJNSCH(B2:B8;A2:A8;1;1)'''</tt> returns the statistics for the best fit line through those points.
  
  
Line 43: Line 43:
 
<br style="clear:both;" />
 
<br style="clear:both;" />
  
: In the example above, you measure the floor area and count the windows of a sample of houses in the area, and make a table with the corresponding sale value (cells <tt>'''A2:C8'''</tt>). To predict the value of other houses in the area you might use: ''value'' = ''a'' + ''b<sub>1</sub>''*''floor_area'' + ''b<sub>2</sub>''*''num_windows'', where ''a'', ''b<sub>1</sub>'' and ''b<sub>2</sub>'' are constants. <tt>'''LINEST(A2:A8;B2:C8;1;1)'''</tt> returns appropriate statistics for that equation.
+
: In the example above, you measure the floor area and count the windows of a sample of houses in the area, and make a table with the corresponding sale value (cells <tt>'''A2:C8'''</tt>). To predict the value of other houses in the area you might use: ''value'' = ''a'' + ''b<sub>1</sub>''*''floor_area'' + ''b<sub>2</sub>''*''num_windows'', where ''a'', ''b<sub>1</sub>'' and ''b<sub>2</sub>'' are constants. <tt>'''LIJNSCH(A2:A8;B2:C8;1;1)'''</tt> returns appropriate statistics for that equation.
  
 
=== See also: ===
 
=== See also: ===

Revision as of 14:56, 30 December 2008


LIJNSCH

Geeft een tabel met statistieken terug voor een rechte lijn die het beste past voor een gegevensverzameling.

Syntaxis:

LIJNSCH(GegevensY; GegevensX; Lineairtype; Statistieken)

GegevensY is een bereik van één enkele rij of kolom die de Y-coördinaten specificeert in een verzameling gegevenspunten.
GegevensX is een corresponderend bereik van één enkele rij of kolom die de X-coördinaten specificeert. Als GegevensX wordt weggelaten wordt als standaard 1, 2, 3, ..., n ingevuld. Als er meer dan één verzameling variabelen is, mag GegevensX een bereik zijn met overeenkomende meerdere rijen of kolommen.
LIJNSCH finds a straight line y = a + bx that best fits the data, using linear regression (the "least squares" method). With more than one set of variables the straight line is of the form y = a + b1x1 + b2x2 ... + bnxn.
if allow_const is FALSE the straight line found is forced to pass through the origin (the constant a is zero; y = bx). If omitted, allow_const defaults to TRUE (the line is not forced through the origin).
LIJNSCH returns a table (array) of statistics as below and must be entered as an array formula (for example by using Cntrl-Shift-Enter rather than just Enter)
If stats is omitted or FALSE only the top line of the statistics table is returned. If TRUE the entire table is returned.


Calc linest output.png
b1 to bn are the line gradients; a is the y-axis intercept.
σ1 to σn are the standard error values for the line gradients; σa is the standard error value for the y-axis intercept.
r2 is the determination coefficient (RSQ); σy is the standard error value for the y estimate.
F is the F statistic (F-observed value); df is the number of degrees of freedom.
ssreg is the regression sum of squares; ssresid is the residual sum of squares.


Example:

Calc linest example.png


In the example above, cells A2:B8 contain the x,y values for a set of points. LIJNSCH(B2:B8;A2:A8;1;1) returns the statistics for the best fit line through those points.


Calc linest example2.png


In the example above, you measure the floor area and count the windows of a sample of houses in the area, and make a table with the corresponding sale value (cells A2:C8). To predict the value of other houses in the area you might use: value = a + b1*floor_area + b2*num_windows, where a, b1 and b2 are constants. LIJNSCH(A2:A8;B2:C8;1;1) returns appropriate statistics for that equation.

See also:

LOGSCH, TREND, R.KWADRAAT, SNIJPUNT, STIJGING

Hoe matrices te gebruiken in Calc

Array functions

Functions listed alphabetically, Functions listed by category

Problemen:

  • U moet goed op de hoogte zijn van de betrokken statistiek.
  • Lege cellen in de uitvoer-matrix tonen #N/B (in Calc en Excel).
Personal tools