Learn R Programming

MiscMath (version 1.1)

microLASSO: Simplest Case of LASSO Regression

Description

Simple linear regression estimators for slope, intercept and noise standard deviation with absolute value penalty on slope.

Usage

microLASSO(x, y, lambda)

Value

a list consisting of

Coefficients

a numeric vector containing intercept and slope estimates

RMSE

a numeric constant containing the (penalized) maximum likelihood estimate of the noise standard deviation

Arguments

x

a numeric vector of covariate values

y

a numeric vector of response values

lambda

a numeric constant which should be nonnegative

Examples

Run this code
x <- runif(30)
y <- x + rnorm(30)
microLASSO(x, y, lambda = 0.5)

Run the code above in your browser using DataLab