Maximin: Returns a list that provides materials for later inference...

View source: R/Maximin.R

MaximinR Documentation

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 L

Ylist

list of outcome vector for source data, of length L

loading.mat

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

X0

design matrix for target data, of dimension n0 x p (default = NULL)

cov.shift

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

cov0

Covariance matrix for target data, of dimension p x p (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 L, that contains the initial coefficient estimators and variance of fitted residuals.

Points.info

The list of length L, 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)

MaximinInfer documentation built on April 12, 2023, 12:41 p.m.