elemfits: elemental fits

View source: R/Regression.R

elemfitsR Documentation

elemental fits

Description

elemfits compute the Nx(N-1)/2 elemental fits, i.e., intercepts b_0,ij and slopes b_1,ij, that define a line y = b_0+b_1 x that passes through the data points (x_i,y_i) and (x_j,y_j), i<j, where i, j in 1, ..., N. and the respective weights | x_i - x_j |

Usage

elemfits(y, x)

Arguments

y

: (numeric) N vector of real-valued outputs (response vector)

x

: (numeric) N vector of inputs (feature vector)

Value

beta: (numeric) N*(N-1)/2 matrix of elemental fits

w: (numeric) N*(N-1)/2 matrix of weights

Note

File located in Regression.R

Examples


y <- c(0.5377   , 1.8339   ,-2.2588 ,   0.8622,    0.3188)
x <- c(-1.3077  , -0.4336,    0.3426   , 3.5784,    2.7694)

elemfits(y, x)


Mufabo/Rrobustsp documentation built on June 11, 2022, 10:41 p.m.