No matching definitions.

stats/regress

src/stats/regress.tur
defn

ols

(ols [y :int xs :int names :int intercept? :int] :int)

Ordinary least squares.

y:int float64 response column
xs:int cons list of float64 predictor columns
names:int cons list of :cstr, one per predictor
intercept?:int 1 to include intercept term, 0 to suppress

:int ok-val wrapping an lm-fit handle, or err-val with message.

(ols y-col (cons x1 (cons x2 0)) (cons "x1" (cons "x2" 0)) 1)

Since: ST7

defn

ols-frame

(ols-frame [f :int response-name :cstr predictor-names :int intercept? :int] :int)

OLS from a frame with named columns.

f:int frame handle
response-name:cstr column name for y
predictor-names:int cons list of :cstr column names for xs
intercept?:int 1 for intercept, 0 to suppress

:int result<lm-fit>

Since: ST7

defn

predict

(predict [fit :int new-xs :int] :int)

generate fitted values for new predictors.

fit:int lm-fit handle
new-xs:int cons list of float64 columns (same order as in ols)

:int float64 column of predictions.

Since: ST7

defn

predict-frame

(predict-frame [fit :int new-frame :int] :int)

generate predictions from a new frame.

fit:int lm-fit handle
new-frame:int frame with the same predictor column names

:int result<column<:float>>

Since: ST7

defn

diagnostics

(diagnostics [fit :int] :int)

per-observation diagnostics frame.

fit:int lm-fit handle

:int frame handle

Since: ST7