ER: Essential Regression

Description Usage Arguments Value Examples

View source: R/ER.R

Description

Under the Essential Regression framework

X = AZ+E, Y = Z' β + ε,

perform prediction of Y, estimation and inference of β.

Usage

 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"
)

Arguments

Y

A vector of response with length n.

X

A n by p data matrix.

res_LOVE

The returned object from LOVE.

beta_est

The procedure used for estimating β. One of {NULL, "LS", "Dantzig"}

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 NULL or "Bonferroni". The default value is "Bonferroni".

Value

A list of objects including:

Examples

 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")

bingx1990/LoveER documentation built on Jan. 17, 2022, 12:04 p.m.