algo_average: leveraging methods for linear regression.

Description Usage Arguments Details Value Examples

Description

implements algorithmic leveraging for linear regression using uniform and leverage score based subsampling of rows.

Usage

1
algo_average(x, y, r, draws = 500, seed = 101)

Arguments

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.

Details

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.

Value

beta_unif estimated coefficients matrix of all draws using uniform subsampling.

beta_blev estimated coefficients matrix of all draws using leverage score based subsampling

Examples

1
2
3
x = rt(500, df=6)
y = -x + rnorm(500)
est = algo_average(x,y,r=50)

yuxuanzhao2295/CompStat_hw2 documentation built on May 22, 2019, 12:19 p.m.