CI.Rsq.measure: Functions to generate the confidence interval of the Rsq...

Description Usage Arguments Value Examples

View source: R/RsqMed_sd.R

Description

Functions to generate the confidence interval of the Rsq measure using nonparametric bootstrap.

Usage

1
2
3
CI.Rsq.measure(p = 1/2, outcome, med, covar, indp, method = c("iSIS",
  "All"), B = 200, iter.max = 10, nsis = NULL, init.cutoff = 0.1,
  screening = F)

Arguments

p

Proportion of the training dataset for selecting mediators regarding to the whole dataset, default is set as 1/2

outcome

Vector of outcome type of interest; Only Gaussian distributed outcome is accepted.

med

Matrix of putative mediators

covar

Covariate matrix

indp

Vector of the independent variable of interest, e.g. environmental exposure

method

Method used to screen out non-mediators. When no variable selection is required, method='ALL'; otherwise, iterative sure independence screening (SIS) is used for variable selection, i.e., method='iSIS'.

B

Number of bootstrap samples, default is 100

iter.max

Maximum number of iteration used in iSIS, default=10 (details see the SIS package)

nsis

Number of pedictors recruited by iSIS

init.cutoff

The percentage of mediators remaining after the screening step.

screening

T: filtering mediators based on the strength of indp and mediators as a preprocessing step; F: all putative mediators are included, default=F.

Value

CI: The 95 percent confidence intervals of Rsq measure (Rsq.mediated), shared over simple effects (SOS), number of mediators selected (pab), variance of outcome explained by mediator (Rsq.YM), variance of outcome explained by the independent variable (Rsq.YX), and variance of outcome explained by mediator and independent variable (Rsq.YMX). The estimates for each bootstrap are also returned.

Examples

1
2
3
4
5
6
7
{
 
data(example)
attach(example)
CI.Rsq.measure( p=1/2, outcome=Y,med=M[,1:2],covar=NULL,indp=X,method='ALL', B=1)

}

RsqMed documentation built on Feb. 2, 2020, 5:06 p.m.