mpqr {pqrfe}R Documentation

Multiple penalized quantile regression

Description

Estimate penalized quantile regression for several taus

Usage

mpqr(x, y, subj, tau = 1:9/10, effect = "simple", c = 0)

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.

effect

Factor, "simple" simple regression, "fixed" regression with fixed effects, "lasso" penalized regression with fixed effects.

c

Numeric, 0 is quantile, Inf is expectile, any number between zero and infinite is M-quantile.

Value

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

Beta array with dimension (ntau, 3, d), where Beta[i,1,k] is the i-th tau estimation of beta_k, Beta[i,2,k] is the i-th tau lower bound 95% confidence of beta_k, and Beta[i,3,k] is the i-th tau lower bound 95% confidence of beta_k.

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 = as.vector(x %*% beta + rep(alpha, each=m) + eps)

Beta = mpqr(x,y,subj,tau=1:9/10, effect="fixed", c = 1.2)
Beta


[Package pqrfe version 1.1 Index]