cumbeta

Syntax

cumbeta(Y, X)

Arguments

Y and X are vectors of the same length.

Details

Cumulatively calculate the coefficient estimate of the regression of Y on X. The result is a vector of the same length as X.

Examples

$ x=1 3 5 7 11 16 23
$ y=1 6 9 8 15 23 34;

$ cumbeta(y,x);
[,2.5,2,1.2,1.256757,1.365322,1.440948]