mqr_alpha {alqrfe}R Documentation

multiple penalized quantile regression - alpha

Description

Estimate QR intercepts for several taus

Usage

mqr_alpha(
  x,
  y,
  subj,
  tau = 1:9/10,
  method = "qr",
  ngrid = 20,
  inf = 1e-08,
  digt = 4
)

Arguments

x

Numeric matrix, covariates

y

Numeric vector, outcome.

subj

Numeric vector, identifies the unit to which the observation belongs.

tau

Numeric vector, identifies the percentiles.

method

Factor, "qr" quantile regression, "qrfe" quantile regression with fixed effects, "lqrfe" Lasso quantile regression with fixed effects, "alqr" adaptive Lasso quantile regression with fixed effects.

ngrid

Numeric scalar greater than one, number of BIC to test.

inf

Numeric scalar, internal value, small value.

digt

Numeric scalar, internal value greater than one, define "zero" coefficient.

Value

Alpha Numeric array, with three dimmensions: 1) tau, 2) coef., lower bound, upper bound, 3) exploratory variables.

Examples

n = 10
m = 5
d = 4
N = n*m
L = N*d
x = matrix(rnorm(L), ncol=d, nrow=N)
subj = rep(1:n, each=m)
alpha = rnorm(n)
beta = rnorm(d)
eps = rnorm(N)
y = x %*% beta  + matrix(rep(alpha, each=m) + eps)
y = as.vector(y)

Alpha = mqr(x,y,subj,tau=1:9/10, method="qr", ngrid = 10)
Alpha


[Package alqrfe version 1.1 Index]