Programmer Guide/Command Reference/EVAL/rpolyreg: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====rpolyreg=====
Linear, multivariant and polynominal regression.
 
----
Computes the polynomial regression coefficients of order <var>m</var> for the function <code>y=f(</code><var>x</var><code>)</code>.
;Usage 1: <code>rpolyreg(<var>x</var>, {<var>y</var>})</code>:
 
:;<var>x</var>: x data vector
=====Usage:=====
:;<var>y</var>: y data vector: <code>''y''[i] = f(''x''[i])</code>
 
;Result 1: A vector ''r'' with the two linear regression coefficients.
<code>rpolyreg(<var>m</var>, <var>y</var>, {<var>x</var>})</code>
:<code>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1] * ''x''[i]
 
----
=====Parameters:=====
 
;<var>m</var>
 
:The regression order (<code>1</code>=linear etc).
 
;<var>y</var>
 
:The y data vector.
 
;<var>x</var>
 
:The x data vector. If <var>x</var> is not supplied, then <var>x</var><code>[i]</code> is set to the value of <code>i</code>.
 
=====Result:=====
 
The regression coefficients - a vector with <var>m</var><code>+1</code> elements.
 
=====Return Type:=====
 
A vector.

Revision as of 13:40, 11 April 2011

Linear, multivariant and polynominal regression.


Usage 1
rpolyreg(x, {y}):
x
x data vector
y
y data vector: y[i] = f(x[i])
Result 1
A vector r with the two linear regression coefficients.
yREG[i] = r[0] + r[1] * x[i]

Navigation menu

Personal tools