View source: R/exploreInformWeight.R
explore_q | R Documentation |
The function calculates various statistical quantities giving some information about the behavior of informative lower SCI-bounds (informSCI) and its induced test for a given graphical test procedure with m hypotheses. The simulation is done for different information weights of the hypotheses. These statistical quantities are intended to be used for determining information weights that represent the best possible trade-off between the number of rejections and the expected size of the informative lower informative SCI-bounds. The statistical quantities can also be calculated for the graphical test and the related compatible lower SCI-bounds, which allows a comparison between the two strategies.
explore_q(
gMCP = NULL,
g = NULL,
weights = NULL,
trueParam,
sigma = NULL,
qFixed = matrix(0, 0, 2),
mu_0 = 0,
alpha = 0.05,
addHyp = matrix(0, 0, 3),
allRej = NULL,
atLeastOneRej = NULL,
qGrid = NULL,
qInterval = c(0, 1),
qStepSize = 1/10,
numSim = 1000,
sampleSizes = NULL,
sampleSizeControl = NULL,
varObs = NULL,
exploreGraph = TRUE,
eps = 1/10^5,
timesSmallerEps = 3,
maxIterSCI = 1000,
maxIterBisec = 1000,
tolBisec = 1/10^3
)
gMCP |
An object of class |
g |
Numeric square matrix of transition weights for the graphical test
with m rows and m columns. The i-th row of the entered matrix defines the
arrows starting from the i-th hypothesis. Each entry has to be between
0 and 1 and each row must sum to a number less than or equal to 1. The
diagonal elements must be zero. Entering |
weights |
Numeric vector of weights of dimension m. It defines the
initial proportion of significance level which is assigned to each null
hypothesis. Entering |
trueParam |
A numeric vector of dimension m defining the assumed true
parameters |
sigma |
A covariance matrix of dimension |
qFixed |
A numeric matrix with l rows and 2 columns, where l is an
integer between 0 and m. The matrix describes the fixed information weights
of the simulation. The first column indicates the indices of the hypothesis
for which the information weight should be fixed during the simulation
(i.e. the entries of the first column must be natural numbers between
1 and m). The second column contains the fixed values of their respective
fixed information weights (i.e. the entries of the second column must be
between 0 and 1 (inclusive)). It is permissible for all information weights
to be fixed (i.e. |
mu_0 |
A numeric vector of dimension 1 or m defining the bounds of the
null hypotheses of the underlying graphical test. If |
alpha |
A numeric defining the overall significance level for the
graphical test (i.e. SCIs will have coverage probability of at least
|
addHyp |
A numeric matrix with k rows and 3 columns (k can be 0) The matrix indicates for which (further) shifted hypotheses the rejection probability is to be calculated. Every row describes one hypothesis. The first entry is a natural number greater than m identifying the hypothesis. The second entry of each row is the index of the corresponding parameter of interest. The third entry is the right border of the hypothesis. |
allRej |
A list of vectors. Each vector in the list contains the indices
of subfamilies of the family of all hypotheses, including the |
atLeastOneRej |
A list of vectors. Each vector in the list contains the
indices of subfamilies of the family of all hypotheses, including
the |
qGrid |
A numeric vector indicating the values of the non-fixed information weights for the simulation. The entries must be between 0 and 1 (inclusive). |
qInterval |
A numeric vector of dimension 2 specifying the minimum
and maximum values allowed for the varying information weights.
|
qStepSize |
A positive numeric defining the step size for the varying
information weights. |
numSim |
A natural number indicating how many simulations are to be performed. |
sampleSizes |
A numeric vector indicating the sample size of each
non-control group, in the many-to-one case. Not required if |
sampleSizeControl |
A numeric indicating the sample size of the control
group, in the many-to-one case. Not required if |
varObs |
A positive numeric indicating the variance of the individual
observations, in the many-to-one case. Not required if |
exploreGraph |
A boolean indicating whether the simulation should be also done for the underlying graphical test and the corresponding compatible lower SCI-bounds. |
eps |
A numeric for the |
timesSmallerEps |
A positive integer for the |
maxIterSCI |
Maximum number of iterations for determining the lower informative SCI-bounds. |
maxIterBisec |
Maximum number of iterations of the bisection method
which is used during the |
tolBisec |
A non-negative numeric indicating the error tolerance of
the bisection method which is used for finding roots in the
|
It is assumed that there are m parameters of interest
\vartheta_1,\dots,\vartheta_m
. For each parameter there is a null
hypothesis defined as H_i^{{\mu_0}_i}:\vartheta_i\leq{\mu_0}_i
.
The bounds {\mu_0}
correspond to mu_0
. The underlying graphical
test (specified by gMCP
or g
and weights
) is based on
these hypotheses.
The function simulates estimations of point estimators for the parameter of
interest \vartheta_1,\dots, \vartheta_m
. The estimators follow a
multivariate normal distribution with mean trueParam
and covariance
matrix sigma
. The function repeatedly calls the
informSCI
-function.
The algorithm only optimizes for a single parameter, which is used for all
non-fixed information weights.
The parameter is chosen from a grid specified by qInterval
and
qStepsize
. The constructed grid contains all values which are between
qInterval[1]
and qInterval[2]
and can be written as
qInterval[1]
+k\cdot
qStepsize
where k is a natural number.
Alternatively, the parameter is chosen directly from qGrid
.
The function returns a list containing several statistical quantities
to use for the informative lower SCI-bounds to find the best possible
trade-off between the number of rejections and the expected size of the
informative lower SCI-bounds. In the case that exploreGraph=TRUE
,
the returned list also contains the same quantities for the (original)
graphical test and related compatible bounds. This allows a comparison.
rejecHyp
: A matrix containing for several hypotheses the
empirical rejection probability by the informative confidence bounds.
The first m rows correspond to the hypotheses of the graph. The other rows
correspond to the hypotheses specified by addHyp
. Each row indicates
the rejection probability for different values of the information weights.
meanISCI
: A matrix containing in its columns the empirical mean
of the lower informative confidence bounds for different information weights.
Only the lower bounds which are greater than -Inf
are used for the
empirical mean.
impISCI
: A matrix containing in its columns the empirical
average distance between the lower informative confidence bounds and
mu_0
for different information weights. Only the lower bounds which
are greater than -Inf
are used for the empirical average distance.
biasISCI
: A matrix containing in its columns the empirical
average distance between the lower informative confidence bounds and the
true parameters trueParam
for different information weights. Only the
lower bounds which are greater than -Inf
are used for the empirical
average distance.
numISCIfinite
: A matrix containing in its columns how many times
the lower informative confidence bounds were each greater than -Inf
for different information weights.
rejecAllHyp
: A matrix containing in its columns for each family
from allRej
the empirical probability of rejecting all of the
hypotheses from the family with the induced test at the same time for
different information weights.
rejecAtLeastHyp
: A matrix containing in its columns for each
family from atLeastOneRej
the empirical probability of rejecting
at least one of the hypotheses from the family with the induced test for
different information weights.
If exploreGraph=TRUE
:
rejecHypGraph
: A vector containing for each of the null
hypotheses of the graph and of the additional hypotheses (specified by
addHyp
) its empirical rejection probability by the original graph.
meanCSCI
: A vector containing, for each parameter
\vartheta_i, 1\leq i\leq m
the empirical mean of the lower compatible
confidence bounds. Only the lower bounds which are greater than -Inf
are used for the empirical mean.
impCSCI
: A vector containing, for each parameter, the empirical
average distance between the lower compatible confidence bounds and
mu_0
. Only the lower bounds which are greater than -Inf
are
used.
biasCSCI
: A vector containing, for each parameter,
the empirical average distance between the lower compatible confidence bounds
and the true parameters trueParam
. Only the lower bounds which are
greater than -Inf
are used.
numCSCIfinite
: A vector containing, for each parameter, how
many times the compatible lower confidence bounds were each greater
than -Inf
.
rejecAllHypCSCI
: A vector containing, for each family from
allRej
, the empirical probability of rejecting all of the hypotheses
from the family with the (original) graphical test.
rejecAtLeastHypCSCI
: A vector containing, for each family from
atLeastOneRej
, the empirical probability of rejecting at least one
of the hypotheses from the family with the (original) graphical test.
S. Schmidt, W. Brannath: Informative simultaneous confidence intervals for the fallback procedure. Biometrical Journal 57.4 (2015), pp. 712–719.
informSCI
gMCP
simConfint
explore_q(gMCP=BonferroniHolm(3), trueParam=c(1.5,1,0.2),
sigma=diag(3)*0.2, qFixed=matrix(c(2,3,0.3,0.3),2,2), mu_0=c(-0.5,0,0),
addHyp=matrix(c(4,1,0),1,3),allRej =list(c(1,2), c(4,2)),
atLeastOneRej=list(c(2,3)),numSim=100)
explore_q(g=matrix(c(0,0,1,0),2,2), weights=c(1,0), trueParam=c(0.5,2),
mu_0=c(-1,0), alpha=0.025, qGrid=c(1/10*c(1:10),c(0.97,0.98,0.99)),
numSim=100, sampleSizes=c(89,95), sampleSizeControl=77, varObs=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.