l4acp: l4acp

Description Usage Arguments Details Value References See Also Examples

Description

LASSO regression of a model with a change point due to a covariate threshold. It obtains regression coefficients for covariates, and a threshold parameter.

Usage

1
l4acp(x, y, q, s, trim=0.1)

Arguments

x

Covariates.

y

A dependent variable.

q

A threshold covariate.

s

The values of lambda(tuning parameter) used for lasso regression. To know what the objective function that is minimized for lasso regression, see the "Details" below. This is not given by default. To get an idea which value to use, check cvl4acp.

trim

The percentile for trimming the data of a threshold covariate (from above and below) to obtain the range for threshold parameter. By default, it is 0.1. And this results in finding a threshold parameter from 10-90 percentile range of a threshold variable.

Details

The regression model by this function is

Y = α + X*β + X*δ*I{q<τ} + u

. The estimated coefficients by l4acp contain the estimators for alpha(intercept), beta(coefficients before a change point), and delta(coefficients change after a change point). tau.hat is the estimator for tau in the model above. The objective function that is minimized is

(1/n)*RSS + lambda * penalty

, while the penalty is

∑||X(j)||_2 * |β_{j}|_1

. This is the exact objective function written in Sokbae Lee, Myung Hwan Seo, and Youngki Shin, (2016), which is a little different from that of LARS or glmnet packages. Remember that beta does not contain the estimated intercept.

Value

lambda

The values of lambda used for regression. Each lambda has corresponding tau.hat, coefficients, M.alpha, R2, and adj.R2. Note that it is automatically ordered from high to low values before it runs, and on its result.

tau.hat

The estimated threshold covariates.

coefficients

The regression coefficients for covariates. If the covariates has n different variables, it leads to (2n+2) coefficients. The first (n+1) coefficients can be interpreted as the coefficients when a threshold covariate is below the threshold parameter. It includes an intercept at the head. That's why the number of coefficients is (n+1), not n. And the next (n+1) variables are change of regression coefficients when a threshold covariate exceeds the threshold parameter, also including change of an intercept.

adj.R2

Adjusted R2 square.

M.alpha

The number of nonzero coefficients from regression, whose maximum is (2n+2).

grid.loop

Used for the threshold grid curve.

matrix

A matrix that includes lambda, tau.hat, coefficients, M.alpha, R2, and adj.R2. Each column represents a specific lambda value.

References

Sokbae Lee, Myung Hwan Seo, and Youngki Shin, (2016) The Lasso for High-Dimensional Regression with a Possible Change Point, Journal of the Royal Statistical Society Series B, Vol 78(1), 193-210

See Also

plot.l4acp and cvl4acp

Examples

1
2
3
4
5
6
7
# using 'gdp60' as an threshold variable
data("grdata")
x <- grdata[,c(5:dim(grdata)[2])]
q <- grdata[,"gdp60"]
y <- grdata[,"gr"]
fit <- l4acp(x,y,q, s=0.0007)
plot(fit)

wsggong/toronto documentation built on May 15, 2019, 1:21 p.m.