elemfits | R Documentation |
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 |
elemfits(y, x)
y |
: (numeric) N vector of real-valued outputs (response vector) |
x |
: (numeric) N vector of inputs (feature vector) |
beta: (numeric) N*(N-1)/2 matrix of elemental fits
w: (numeric) N*(N-1)/2 matrix of weights
File located in Regression.R
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.