Skip to main content

regr_avgx

Calculates the linear regression coefficient for the average of x where x and y are not unbound.

Returns: decimal

Table 1.

Parameter

Type

Description

ys

decimal, double

the independent variable

xs

decimal, double

the dependent variable



Example

Query

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/>
PREFIX agg: <http://data.world/function/aggregate#>

SELECT (agg:regr_avgx(?foo, ?bar) AS ?regr_avgx)
{
    [
        :col-aggregations-foo ?foo ;
        :col-aggregations-bar ?bar
    ]
}

Try the query

Table 1. Results

regr_avgx

33.8333