r2b: computing a norm value for the segment from point k1 to k2-1

Description Usage Arguments Value Examples

Description

A -[REAL] coefficient of linear regression (will zero if K1=0) (y=Ax+B), B -[REAL] coefficient of linear regression, R2B -[REAL] norm of the segment (maximum "distance" measured perpendicular to the regression line)

Usage

1
r2b(k1, k2, x, y)

Arguments

k1

[INTEGER] start point

k2

[INTEGER] end point+1

x

[REAL(?)] input x-axis array (predictor)

y

[REAL(?)] input y-axis array (response)

Value

A -[REAL] coefficient of linear regression (will zero if K1=0) (y=Ax+B), B -[REAL] coefficient of linear regression, R2B -[REAL] norm of the segment (maximum "distance" measured perpendicular to the regression line)

Examples

1
2
3
4
5
6
7
ni <- c( 1, 201, 402 )
i <- 1
k1 <- ni[i]
k2 <- ni[i+1]


r2b(k1, k2, y=t11$temper, x=t11$depth)

boshek/limnotools documentation built on May 13, 2019, 12:36 a.m.