pqr | R Documentation |
Estimate parameters and tuning parameter.
pqr(x, y, subj, tau = 0.5, effect = "simple", c = 1)
x |
Numeric matrix, covariates |
y |
Numeric vector, outcome. |
subj |
Numeric vector, identifies the unit to which the observation belongs. |
tau |
Numeric scalar between zero and one, identifies the percentile. |
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. |
alpha Numeric vector, intercepts' coefficients.
beta Numeric vector, exploratory variables' coefficients.
lambda Numeric, estimated lambda.
res Numeric vector, percentile residuals.
tau Numeric scalar, the percentile.
penalty Numeric scalar, indicate the chosen effect.
c Numeric scalar, indicate the chosen c.
sig2_alpha Numeric vector, intercepts' standard errors.
sig2_beta Numeric vector, exploratory variables' standard errors.
Tab_alpha Data.frame, intercepts' summary.
Tab_beta Data.frame, exploratory variables' summary.
Mat_alpha Numeric matrix, intercepts' summary.
Mat_beta Numeric matrix, exploratory variables' summary.
Koenker, R. (2004) "Quantile regression for longitudinal data", J. Multivar. Anal., 91(1): 74-89, <doi:10.1016/j.jmva.2004.05.006>
n = 10 m = 5 d = 4 N = n*m x = matrix(rnorm(d*N), 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) m1 = pqr(x=x, y=y, subj=subj, tau=0.75, effect="lasso", c = 0) m1$Tab_beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.