Skip to main content

regr_r2

Calculates the linear regression R-squared coefficient for goodness of fit of the linear regression 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_r2(?foo, ?bar) AS ?regr_r2)
{
    [
        :col-aggregations-foo ?foo ;
        :col-aggregations-bar ?bar
    ]
}

Try the query

Table 1. Results

regr_r2

0.5307