microLASSO: Simplest Case of LASSO Regression

View source: R/microLASSO.R

microLASSOR Documentation

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)

Arguments

x

a numeric vector of covariate values

y

a numeric vector of response values

lambda

a numeric constant which should be nonnegative

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

Examples

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

MiscMath documentation built on April 13, 2025, 9:07 a.m.