Skip to main content

RegrCount

This class provides a statistical aggregate function that returns the number of non-null pairs of expressions used in a linear regression. It is typically used within database queries to count the data points available for regression analysis, returning an integer result with a default value of zero for empty result sets.

Attributes

AttributeTypeDescription
functionstring = REGR_COUNTThe SQL aggregate function name used for calculating the number of input rows in a linear regression model.
output_field[IntegerField](../../../../forms/fields/integerfield.md?sid=django_forms_fields_integerfield)The model field type used to represent the resulting count, ensuring the value is handled as an integer.
empty_result_set_valueinteger = 0The default value returned by the aggregate when the result set contains no rows.

Constructor

Signature

def RegrCount() - > null

Signature

def RegrCount(
y: string,
x: string,
**extra: dict
) - > null

Parameters

NameTypeDescription
ystringThe name of the dependent variable field
xstringThe name of the independent variable field
**extradictAdditional keyword arguments to be passed to the parent StatAggregate constructor