significance.test {CovRegRF}  R Documentation 
This function runs a permutation test to evaluate the effect of a subset of covariates on the covariance matrix estimates. Returns an estimated pvalue.
significance.test(
formula,
data,
params.rfsrc = list(ntree = 1000, mtry = ceiling(px/3), nsplit = max(round(n/50),
10)),
nodesize.set = round(0.5^(1:100) * round(0.632 * n))[round(0.5^(1:100) * round(0.632
* n)) > py],
nperm = 500,
test.vars = NULL
)
formula 
Object of class 
data 
The multivariate data set which has 
params.rfsrc 
List of parameters that should be passed to

nodesize.set 
The set of 
nperm 
Number of permutations. 
test.vars 
Subset of covariates whose effect on the covariance matrix
estimates will be evaluated. A character vector defining the names of the
covariates. The default is 
An object of class (covregrf, significancetest)
which is a list
with the following components:
pvalue 
Estimated *p*value, see below for details. 
best.nodesize 
Best 
best.nodesize.control 
Best 
test.vars 
Covariates whose effect on the covariance matrix estimates is evaluated. 
control.vars 
Controlling set of covariates. 
predicted.oob 
OOB predicted covariance matrices for training
observations using all covariates including the 
predicted.perm 
Predicted covariance matrices for the permutations
using all covariates including the 
predicted.oob.control 
OOB predicted covariance matrices for training
observations using only the set of controlling covariates. If

predicted.perm.control 
Predicted covariance matrices for the
permutations using only the set of controlling covariates. If

We perform a hypothesis test to evaluate the effect of a subset of covariates
on the covariance matrix estimates, while controlling for the rest of the
covariates. Define the conditional covariance matrix of Y
given all
X
variables as \Sigma_{X}
, and the conditional covariance
matrix of Y
given only the set of controlling X
variables as
\Sigma_{X}^{c}
. If a subset of covariates has an effect on the
covariance matrix estimates obtained with the proposed method, then
\Sigma_{X}
should be significantly different from \Sigma_{X}^{c}
.
We conduct a permutation test for the null hypothesis
H_0 : \Sigma_{X} = \Sigma_{X}^{c}
We estimate a
p
value with the permutation test. If the p
value is less than the
prespecified significance level \alpha
, we reject the null
hypothesis.
Testing the global effect of the covariates on the conditional covariance
estimates is a particular case of the proposed significance test. Define
the unconditional covariance matrix estimate of Y
as
\Sigma_{root}
which is computed as the sample covariance matrix of
Y
, and the conditional covariance matrix of Y
given X
as
\Sigma_{X}
which is obtained with covregrf()
. If there is a
global effect of X
on the covariance matrix estimates, the
\Sigma_{X}
should be significantly different from \Sigma_{root}
.
The null hypothesis for this particular case is
H_0 : \Sigma_{X} = \Sigma_{root}
covregrf
predict.covregrf
print.covregrf
## load generated example data
data(data, package = "CovRegRF")
xvar.names < colnames(data$X)
yvar.names < colnames(data$Y)
data1 < data.frame(data$X, data$Y)
## formula object
formula < as.formula(paste(paste(yvar.names, collapse="+"), ".", sep=" ~ "))
## test the effect of x3, while controlling for the x1 and x2
significance.test(formula, data1, params.rfsrc = list(ntree = 50),
nperm = 5, test.vars = "x3")
## test the global effect of covariates
significance.test(formula, data1, params.rfsrc = list(ntree = 50),
nperm = 5, test.vars = NULL)