Description Usage Arguments Details Value Examples
implements algorithmic leveraging for linear regression using uniform and leverage score based subsampling of rows.
1 | algo_average(x, y, r, draws = 500, seed = 101)
|
x |
one-dimensional observations. |
y |
response variable. |
r |
the size of random sample. |
draws |
number of draws of subsmaples. |
seed |
seed number for reproducible experiments. |
This algorithm approximates the linear regression coefficient in a dataset of sample size n using only a randomly selected subset of size r<<n. Selecting r samples uniformly at random often produces biased estimate, while selecting samples with probability proportional to their leverage scores largely alleviates this problem.
beta_unif
estimated coefficients matrix of all draws using uniform subsampling.
beta_blev
estimated coefficients matrix of all draws using leverage score based subsampling
1 2 3 | x = rt(500, df=6)
y = -x + rnorm(500)
est = algo_average(x,y,r=50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.