Loading

LR

gts statistics

Compute the simple linear regression parameters alpha (y-intercept) and beta (line slope) for the given numerical Geo Time Series™.

LR is available since version 1.0.13.

Signatures

Examples

NEWGTS 'random' RENAME 0.0 'i' STORE 1 500 <% NaN NaN NaN $i RAND 0.5 - + DUP 'i' STORE ADDVALUE %> FOR DUP LR 'beta' STORE 'alpha' STORE NEWGTS 'lr' RENAME 1 1000 <% DUP 'i' STORE NaN NaN NaN $beta $i * $alpha + ADDVALUE %> FOR