Package 'MaximinInfer'

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

Help Index


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 = FALSE)

Value

delta

The data-dependent ridge penalty

reward.ratio

The ratio of penalized reward over non-penalized reward


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 LL

mm.effect

The aggregated maximin effect (coefficients), of length pp or p+1p+1

mminfer

The list of length n.loadingn.loading, each contains the point estimator and confidence interval


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 LL

Ylist

list of outcome vector for source data, of length LL

loading.mat

Loading matrix, of dimension n.loadingn.loading x pp, each column corresponds to a loading of interest

X0

design matrix for target data, of dimension n0n0 x pp (default = NULL)

cov.shift

Covariate shifts or not between source and target data (default = TRUE)

cov0

Covariance matrix for target data, of dimension pp x pp (default = NULL)

intercept

Should intercept be fitted for the initial estimator (default = TRUE)

intercept.loading

Should intercept term be included for the loading (default = FALSE)

lambda

The tuning parameter in fitting initial model. If NULL, it will be picked by cross-validation. (default = NULL)

verbose

Should intermediate message(s) be printed. (default = FALSE)

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 LL, that contains the initial coefficient estimators and variance of fitted residuals.

Points.info

The list of length LL, that contains the initial debiased estimator for linear combinations and its corresponding standard error.

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)

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