Class a.regress_simple
simple linear regression
Tables
a.regress_simple | simple linear regression |
Methods
a.regress_simple:new (coef, bias) | constructor for simple linear regression |
a.regress_simple:init (coef, bias) | initialize for simple linear regression |
a.regress_simple:eval (val) | calculate predicted value for simple linear regression |
a.regress_simple:evar (val) | calculate predicted value for simple linear regression |
a.regress_simple:ols_ (ctx, x, y, x_mean, y_mean) | ordinary least squares for simple linear regression |
a.regress_simple:olsx (ctx, x, y, x_mean) | ordinary least squares for simple linear regression |
a.regress_simple:olsy (ctx, x, y, y_mean) | ordinary least squares for simple linear regression |
a.regress_simple:ols (ctx, x, y) | ordinary least squares for simple linear regression |
a.regress_simple:zero () | zeroing for simple linear regression |
Tables
Methods
- a.regress_simple:new (coef, bias)
-
constructor for simple linear regression
Parameters:
- coef number regression coefficient
- bias number intercept
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:init (coef, bias)
-
initialize for simple linear regression
Parameters:
- coef number regression coefficient
- bias number intercept
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:eval (val)
-
calculate predicted value for simple linear regression
Parameters:
- val number independent variable
Returns:
-
number
predicted value
- a.regress_simple:evar (val)
-
calculate predicted value for simple linear regression
Parameters:
- val number dependent variable
Returns:
-
number
predicted value
- a.regress_simple:ols_ (ctx, x, y, x_mean, y_mean)
-
ordinary least squares for simple linear regression
Parameters:
- ctx a.regress_simple simple linear regression userdata
- x table predictor data, specified as a numeric vector
- y table response data, specified as a numeric vector
- x_mean number mean of predictor data
- y_mean number mean of response data
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:olsx (ctx, x, y, x_mean)
-
ordinary least squares for simple linear regression
Parameters:
- ctx a.regress_simple simple linear regression userdata
- x table predictor data, specified as a numeric vector
- y table response data, specified as a numeric vector
- x_mean number mean of predictor data
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:olsy (ctx, x, y, y_mean)
-
ordinary least squares for simple linear regression
Parameters:
- ctx a.regress_simple simple linear regression userdata
- x table predictor data, specified as a numeric vector
- y table response data, specified as a numeric vector
- y_mean number mean of response data
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:ols (ctx, x, y)
-
ordinary least squares for simple linear regression
Parameters:
- ctx a.regress_simple simple linear regression userdata
- x table predictor data, specified as a numeric vector
- y table response data, specified as a numeric vector
Returns:
-
a.regress_simple
simple linear regression userdata
- a.regress_simple:zero ()
-
zeroing for simple linear regression
Returns:
-
a.regress_simple
simple linear regression userdata