Learn R Programming

backShift (version 0.1.4.3)

bootstrapBackShift: Computes a simple model-based bootstrap confidence interval for success of joint diagonalization procedure. The model-based bootstrap approach assumes normally distributed error terms; the parameters of the noise distribution are estimated with maximum likelihood.

Description

Computes a simple model-based bootstrap confidence interval for success of joint diagonalization procedure. The model-based bootstrap approach assumes normally distributed error terms; the parameters of the noise distribution are estimated with maximum likelihood.

Usage

bootstrapBackShift(
  Ahat,
  X,
  ExpInd,
  nrep,
  alpha = 0.05,
  covariance = TRUE,
  baseInd = 1,
  tolerance = 0.001,
  verbose = FALSE
)

Arguments

Ahat

Estimated connectivity matrix returned by backShift.

X

A (nxp)-dimensional matrix (or data frame) with n observations of p variables.

ExpInd

Indicator of the experiment or the intervention type an observation belongs to. A numeric vector of length n. Has to contain at least three different unique values.

nrep

Number of bootstrap samples.

alpha

Significance level for confidence interval.

covariance

A boolean variable. If TRUE, use only shift in covariance matrix; otherwise use shift in Gram matrix. Set only to FALSE if at most one variable has a non-zero shift in mean in the same setting (default is TRUE).

baseInd

Index for baseline environment against which the intervention variances are measured. Defaults to 1.

tolerance

Precision parameter for ffdiag: the algorithm stops when the criterium difference between two iterations is less than tolerance. Default is 10^(-4).

verbose

If FALSE, messages are supressed.

Value

A list with the following elements:

  • bootsSumOffDiags Vector of length nrep with sum of off-diagonal elements after joint diagnolization procedure in each of the bootstrap samples.

  • sumOffDiagsBackShift Sum of off-diagonal elements after joint diagnolization procedure in original estimation.

  • jointDiagSuccess TRUE if sumOffDiagsBackShift lies within bootstrap confidence interval.

  • lower Lower bound of bootstrap confidence interval.

  • upper Upper bound of bootstrap confidence interval.

  • lowerBasic alpha/2 quantile of empirical bootstrap distribution.

  • upperBasic 1 - alpha/2 quantile of empirical bootstrap distribution.