Description Usage Arguments Value Examples
Under the Essential Regression framework
X = AZ+E, Y = Z' β + ε,
perform prediction of Y, estimation and inference of β.
1 2 3 4 5 6 7 8 9 10 11 | ER(
Y,
X,
res_LOVE,
beta_est = "LS",
mu = 0.5,
lbd = 0.5,
CI = F,
alpha_level = 0.05,
correction = "Bonferroni"
)
|
Y |
A vector of response with length n. |
X |
A n by p data matrix. |
res_LOVE |
The returned object from |
beta_est |
The procedure used for estimating β. One of
{ |
mu, lbd |
The tuning parameters used for estimating β via the Dantzig approach. The default value is 0.5. |
CI |
Logical. TRUE if confidence intervals are constructed. |
alpha_level |
The significance level. The default set to 0.05. |
correction |
Correction for addressing the multiple testing problem.
Either |
A list of objects including:
beta
The estimated coefficients of β.
beta_CIs
The coordinate-wise confidence intervals of β.
beta_var
The variances of the beta
.
coef_X
The estimated p-dimensional coefficient between Y and X.
mat_trans_to_Z
The p by K matrix used to predict Z.
fitted_val
The fitted values of length n.
Z_pred
The predicted Z matrix.
X_center
Centers of the input X
.
Y_center
Center of the input Y
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | p <- 6
n <- 50
K <- 2
A <- rbind(c(1, 0), c(-1, 0), c(0, 1), c(0, 1), c(1/3, 2/3), c(1/2, -1/2))
Z <- matrix(rnorm(n * K, sd = 2), n, K)
E <- matrix(rnorm(n * p), n, p)
X <- Z %*% t(A) + E
eps <- rnorm(n)
beta <- c(1, -0.5)
Y <- Z %*% beta + eps
res_LOVE <- LOVE::LOVE(X, pure_homo = TRUE, delta = seq(0.1, 1.1 ,0.1))
res_ER <- ER(Y, X, res_LOVE, CI = TRUE)
res_ER <- ER(Y, X, res_LOVE, CI = TRUE, beta_est = "Dantzig")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.