TD_LINEAR_REGR Syntax Elements - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743
SERIES_SPEC
Takes a single input source with multivariate series instances. The payload content type associated with the input is MULTIVAR_REAL. The number of payload fields depends on whether or not weighting is used. The meanings of the payload fields are as follows:
  • For linear regression with no weighting:
    • First field is the response variable
    • Second field is the explanatory variable
  • For linear regressing with weighting:
    • First field is the response variable
    • Second field is the explanatory variable
    • Third field is the weighting values

See Series Specifications.

FUNC_PARAMS
Name Data Type Description
VARIABLES_COUNT Integer [Optional] Indicator for how many parameters are present in the payload. For linear regression with no weighting, there are 2 parameters (the response variable and the explanatory variable). For linear regression with weighting there are 3 variables (the response variable, the explanatory variable, and the weights). The default is 2.
WEIGHTS Integer Indicator that a third series is present in MULTIVAR series-specifications. The third series is interpreted as a series of weights that can be used to perform a weighted least-squares regression solution.A value of 0 indicates no third series. A value of 1 indicates a third series. The default is 0.
FORMULA Formula string The formula that is to be used in the regression operation. The formula defines the relationship between the explanatory variable and the response variable and conforms to Formula Rules.
ALGORITHM String Algorithm used for the regression. A value of 'QR' means that QR decomposition is used for the regression. A value of 'PSI' means that pseudo-inverse based on singular value decomposition (SVD) is used to solve the regression.
COEFF_STATS Integer [Optional] Indicator to include coefficient statistics columns in the primary RETURN TABLE A value of 1 means return the columns. A value of 0 means do not return the columns. Default is COEFF_STATS(0).

For the column names, see TD_LINEAR_REGR Output.

CONF_INT_LEVEL FLOAT [Optional] The confidence interval level value used for coefficient statistics calculation. The value is greater than 0 and less than 1. CONF_INT_LEVEL is only valid if COEFF_STATS parameter has value 1. Default value is 0.90.
MODEL_STATS Integer [Optional] Indicator to generate the optional model statistics and available for retrieval using the TD_EXTRACT_RESULTS function. A value of 0 indicates to not generate the statistics. A value of 1 indicates to generate the statistics. The default value is 0, do not generate.
RESIDUALS Integer [Optional] Indicator to generate the tertiary (residuals) layer and available for retrieval using the TD_EXTRACT_RESULTS function. A value of 0 indicates to not generate the layer. A value of 1 indicates to generate the layer. The default value is 0, do not generate.
INPUT_FMT
No INPUT_FMT options are available for this function.
OUTPUT_FMT
No OUTPUT_FMT options are available for this function.