| Type: | Package |
| Title: | Inference for Maximin Effects in High-Dimensional Settings |
| Version: | 2.0.0 |
| Author: | Zhenyu Wang; Zijian Guo |
| Maintainer: | Zhenyu Wang <zw425@stat.rutgers.edu> |
| Description: | Implementation of the sampling and aggregation method for the covariate shift maximin effect, which was proposed in <doi:10.48550/arXiv.2011.07568>. It constructs the confidence interval for any linear combination of the high-dimensional maximin effect. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.2.3 |
| Suggests: | knitr, rmarkdown |
| Imports: | MASS, stats, CVXR, glmnet, intervals, SIHR |
| Depends: | R (≥ 2.10) |
| NeedsCompilation: | no |
| Packaged: | 2023-04-12 02:22:47 UTC; zw425 |
| Repository: | CRAN |
| Date/Publication: | 2023-04-12 09:40:02 UTC |
Inference method
Description
Given the returned list of Maximin, compute the Point estimator and Confidence interval.
Usage
Infer(
obj,
delta = 0,
gen.size = 500,
threshold = 0,
alpha = 0.05,
alpha.thres = 0.01
)
Arguments
obj |
returned list of Maximin |
delta |
The ridge penalty (Default = 0) |
gen.size |
The generating sample size (Default = 500) |
threshold |
Should generated samples be filtered or not? if 0, use normal threshold to filter; if 1, use chi-square threshold to filter; if 2, do not filter (Default = 0) |
alpha |
confidence value to construct confidence interval (Default = 0.05) |
alpha.thres |
confidence value to select generated samples (Default = 0.01) |
Value
weight |
The weight vector for groups, of length |
mm.effect |
The aggregated maximin effect (coefficients), of length |
mminfer |
The list of length |
Returns a list that provides materials for later inference method.
Description
Given list of observations, compute the bias-corrected initial estimators and do bias-correction to the regressopm covariance matrix.
Usage
Maximin(
Xlist,
Ylist,
loading.mat,
X0 = NULL,
cov.shift = TRUE,
cov0 = NULL,
intercept = TRUE,
intercept.loading = FALSE,
lambda = NULL,
verbose = FALSE
)
Arguments
Xlist |
list of design matrix for source data, of length |
Ylist |
list of outcome vector for source data, of length |
loading.mat |
Loading matrix, of dimension |
X0 |
design matrix for target data, of dimension |
cov.shift |
Covariate shifts or not between source and target data (default = |
cov0 |
Covariance matrix for target data, of dimension |
intercept |
Should intercept be fitted for the initial estimator
(default = |
intercept.loading |
Should intercept term be included for the loading
(default = |
lambda |
The tuning parameter in fitting initial model. If |
verbose |
Should intermediate message(s) be printed. (default = |
Details
The algorithm implemented scenarios with or without covariate shift. If cov0 is specified,
the X0 will be ignored; if not, while X0 is specified, cov0 will be estimated
by X0. If both are not specified, the algorithm will automatically set cov.shift as
FALSE.
Value
The returned list contains the following components:
Gamma.plugin |
The plugin regression covariance matrix |
Gamma.debias |
The proposed debiased regression covariance matrix |
Var.Gamma |
The variance matrix for sampling the regression covariance matrix |
fits.info |
The list of length |
Points.info |
The list of length |
Examples
L = 2
n1 = n2 = 100; p = 4
X1 = MASS::mvrnorm(n1, rep(0,p), Sigma=diag(p))
X2 = MASS::mvrnorm(n2, rep(0,p), Sigma=0.5*diag(p))
b1 = seq(1,4)/10; b2 = rep(0.2, p)
y1 = as.vector(X1%*%b1+rnorm(n1)); y2 = as.vector(X2%*%b2+rnorm(n2))
loading1 = rep(0.4, p)
loading2 = c(-0.5, -0.5, rep(0,p-2))
loading.mat = cbind(loading1, loading2)
cov0 = diag(p)
mm = Maximin(list(X1,X2),list(y1,y2),loading.mat,cov0=cov0)
# inference
out = Infer(mm, gen.size=10)
Decide ridge penalty data-dependently
Description
To tell if the estimator is stable or not without ridge penalty at first. If instable, it picks a ridge penalty data-dependently.
Usage
decide_delta(
obj,
gen.size = 500,
step_delta = 0.1,
MAX_iter = 100,
verbose = FALSE
)
Arguments
obj |
The returned list of Maximin |
gen.size |
The generating sample size (Default = 500) |
step_delta |
The step size of searching delta (Default = 0.1) |
MAX_iter |
Maximum of iterations for searching (Default = 100) |
verbose |
Print information about delta and reward (Default = |
Value
delta |
The data-dependent ridge penalty |
reward.ratio |
The ratio of penalized reward over non-penalized reward |
measurement of instability
Description
compute the instability measurement given a specific ridge penalty
Usage
measure_instability(
obj,
delta = 0,
gen.size = 500,
threshold = 0,
alpha.thres = 0.01
)
Arguments
obj |
The returned list of Maximin |
delta |
The ridge penalty (Default = 0) |
gen.size |
The generating sample size (Default = 500) |
threshold |
Should generated samples be filtered or not? if 0, use normal threshold to filter; if 1, use chi-square threshold to filter; if 2, do not filter. (Default = 0) |
alpha.thres |
The confidence value to select generated samples (Default = 0.01) |
Value
The measurement of instability