beta
Syntax
beta(Y, X)
Arguments
Y and X are vectors of the same length.
Details
Return the coefficient estimate of an ordinary-least-squares regression of Y on X (with intercept).
Examples
x=1 3 5 7 11 16 23
y=0.1 4.2 5.6 8.8 22.1 35.6 77.2;
beta(y,x);
// output
3.378632