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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:
Linear, multivariant and polynominal regression.
Linear, multivariant and polynominal regression.
----
----
;Usage 1: <code>rpolyreg(<var>x</var>, {<var>y</var>})</code>:
;Usage 1: <code>rpolyreg(<var>x<sub>vector</sub></var>, <var>y<sub>vector</sub></var>)</code>:
:;<var>x</var>: x data vector
:;<var>x</var>: x data vector
:;<var>y</var>: y data vector: <code>''y''[i] = f(''x''[i])</code>
:;<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>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1] * ''x''[i]
----
;Usage 1: <code>rpolyreg(<var>x<sub>vector</sub></var>, <var>y<sub>vector</sub></var>)</code>:
:;<var>x</var>: x data vector
:;<var>y</var>: y data vector: <code>''y''[i] = f(''x''[i,j]^(j+1))</code>
;Result 1: A vector ''r'' with the two linear regression coefficients.  
;Result 1: A vector ''r'' with the two linear regression coefficients.  
:<code>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1] * ''x''[i]
:<code>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1] * ''x''[i]
----
----

Revision as of 13:43, 11 April 2011

Linear, multivariant and polynominal regression.


Usage 1
rpolyreg(xvector, yvector):
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]

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

Navigation menu

Personal tools