Title: | Inference for Maximin Effects in High-Dimensional Settings |
---|---|
Description: | Implementation of the sampling and aggregation method for the covariate shift maximin effect, which was proposed in <arXiv:2011.07568>. It constructs the confidence interval for any linear combination of the high-dimensional maximin effect. |
Authors: | Zhenyu Wang; Zijian Guo |
Maintainer: | Zhenyu Wang <[email protected]> |
License: | GPL-3 |
Version: | 2.0.0 |
Built: | 2024-11-20 06:56:23 UTC |
Source: | CRAN |
To tell if the estimator is stable or not without ridge penalty at first. If instable, it picks a ridge penalty data-dependently.
decide_delta( obj, gen.size = 500, step_delta = 0.1, MAX_iter = 100, verbose = FALSE )
decide_delta( obj, gen.size = 500, step_delta = 0.1, MAX_iter = 100, verbose = FALSE )
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 = |
delta |
The data-dependent ridge penalty |
reward.ratio |
The ratio of penalized reward over non-penalized reward |
Given the returned list of Maximin, compute the Point estimator and Confidence interval.
Infer( obj, delta = 0, gen.size = 500, threshold = 0, alpha = 0.05, alpha.thres = 0.01 )
Infer( obj, delta = 0, gen.size = 500, threshold = 0, alpha = 0.05, alpha.thres = 0.01 )
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) |
weight |
The weight vector for groups, of length |
mm.effect |
The aggregated maximin effect (coefficients), of length |
mminfer |
The list of length |
Given list of observations, compute the bias-corrected initial estimators and do bias-correction to the regressopm covariance matrix.
Maximin( Xlist, Ylist, loading.mat, X0 = NULL, cov.shift = TRUE, cov0 = NULL, intercept = TRUE, intercept.loading = FALSE, lambda = NULL, verbose = FALSE )
Maximin( Xlist, Ylist, loading.mat, X0 = NULL, cov.shift = TRUE, cov0 = NULL, intercept = TRUE, intercept.loading = FALSE, lambda = NULL, verbose = FALSE )
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 = |
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
.
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 |
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)
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)
compute the instability measurement given a specific ridge penalty
measure_instability( obj, delta = 0, gen.size = 500, threshold = 0, alpha.thres = 0.01 )
measure_instability( obj, delta = 0, gen.size = 500, threshold = 0, alpha.thres = 0.01 )
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) |
The measurement of instability