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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:
::<code>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1]*''x''[i,0] + .. + ''r''[''m'']*''x''[i,''m''-1]</code>
::<code>''y''<sub>REG</sub>[i] = ''r''[0] + ''r''[1]*''x''[i,0] + .. + ''r''[''m'']*''x''[i,''m''-1]</code>
----
----
;See also: [[Programmer_Guide/Command_Reference/EVAL/rpoly|rpoly]], [[Programmer_Guide/Command_Reference/EVAL/interp|interp]], [[Programmer_Guide/Command_Reference/EVAL/rleqs|rleqs, cleqs]]
;See also: [[../rpoly|rpoly]], [[../EVAL/interp|interp]], [[../EVAL/rleqs|rleqs, cleqs]]


[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]
[[../#Functions|<function list>]]

Revision as of 11:38, 21 April 2011

Linear, multivariant and polynominal regression.


Usage 1
rpolyreg(xvector, yvector {, m}):
x
x data vector
y
y data vector: y[i] = f(x[i] {, x[i]^2, .., x[i]^m})
m
the regression (polynom) order; m>0 (default=1)
Result 1
Approximate the function y using polynominal regression. The result is the vector r with the m+1 coefficients of the regression polynom.
yREG[i] = r[0] + r[1]*x[i] {+ r[2]*x[i]^2 + .. + r[m]*x[i]^m}

Usage 2
rpolyreg(xmatrix, yvector {, m}):
x
x data matrix, the regression order is the number of independent variables m=ncol(x)
y
y data vector: y[i] = f(x[i,*])
Result 2
Approximate the function y using multivariant linear regression. The result is the vector r with the m+1 regression coefficients.
yREG[i] = r[0] + r[1]*x[i,0] + .. + r[m]*x[i,m-1]

See also
rpoly, interp, rleqs, cleqs

<function list>

Navigation menu

Personal tools