notInExactSCI {informativeSCI}R Documentation

Checking Precision of Approximations

Description

The function checks whether information about the precision of an approximation for the informative lower SCI-bounds can be collected.

Usage

notInExactSCI(
  L,
  randomShifts = 0,
  shifts = NULL,
  tolTrueSCI,
  gMCP = NULL,
  g = NULL,
  weights = NULL,
  q,
  estimates = NULL,
  Z = NULL,
  pValues = NULL,
  SE = NULL,
  I = NULL,
  mu_0,
  alpha,
  checkInput = TRUE
)

Arguments

L

An m-dimensional non-negative vector whose entries are the lower bounds of an approximation of the informative SCI.

randomShifts

A positive integer indicating how many random directions of length tolTrueSCI should be generated.

shifts

A matrix with m columns and any number of rows. Each entry must be non-negative. Each row is a direction in the m-dimensional real space. Each row must have at least one positive entry. randomShifts should be a positive integer or shifts should contain at least one row.

tolTrueSCI

The randomly generated shift-vectors and the row vectors in shifts are rescaled to have length tolTrueSCI.

gMCP

An object of class graphMCP indicating the underlying graphical test.

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 g and weights can be used as the input as an alternative to specifying gMCP.

weights

Numeric vector of weights of dimension m. It defines the initial proportion of significance level which is assigned to each null hypothesis. Entering g and weights can be used as the input as an alternative to specifying gMCP.

q

A numeric vector of dimension 1 or m defining the information weights for each hypothesis. The entries have to be between 0 and 1 (inclusive). If q has dimension 1, the same information weight is used for each hypothesis.

estimates

An m-dimensional numeric vector of unbiased point estimates for the parameters of interest. Each estimator is assumed to be (asymptotically) normal.

Z

An m-dimensional numeric vector of z-scores for testing the null hypotheses. Z can be entered as an alternative to estimates.

pValues

An m-dimensional numeric vector of p-values from (asymptotic) z-tests for testing the null hypotheses. pValues can be entered as an alternative to estimates and Z.

SE

A positive numeric vector of dimension 1 or m indicating the standard errors of the point estimators. If SE has dimension 1, the same value is used for each estimator.

I

A positive numeric vector indicating the information of the estimators. It can be entered as an alternative to the vector SE. The relationship SE=1/I^{1/2} is assumed.

mu_0

A numeric vector of dimension 1 or m defining the bounds of the null hypotheses of the underlying graphical test. If mu_0 has dimension 1, the same value is used for each null hypothesis.

alpha

A numeric defining the overall significance level for the graphical test (i.e. SCIs will have coverage probability of at least 1-alpha. The parameter must be strictly between 0 and 1.

checkInput

A boolean specifying whether the entered values should be checked.

Details

The function checks if it can be determined whether L can be shifted by a rescaled randomly generated direction or by a rescaled direction in the shift matrix such that it describes valid lower informative SCI bounds. If this is possible, the approximation L is imprecise. (The random directions are generated in such a way that all entries are positive.)

Value

Returns TRUE if we can determine that the approximation is imprecise. Returns FALSE if we cannot determine that the approximation is imprecise. (The approximation may still be imprecise.) Note that inExactSCI and notInExactSCI could both return FALSE.

See Also

informSCI explore_q

Examples

g <- matrix(c(0,0,1,0),2,2)
weights <- c(1,0)
q <- c(0.0068,1)
mu_0 <- c(-1,0)
pValues <- c(0.0002,0.01)
SE <- c(0.31,1.11)
alpha <- 0.025
L <- informSCI(g=g, weights=weights, q=q, mu_0=mu_0, pValues=pValues, SE=SE,
alpha=alpha, eps=1/10, tolBisec=1/10)$L
# When the randomShifts- or shift-parameter in the informSCI-function is
# specified, the notInExactSCI-function is called by the informSCI-function.
# It is also possible to analyse the accuracy of a calculated L (or an 
# approximation of the lower informative SCI-bounds) by directly using 
# the notInExactSCI-function:
notInExactSCI(L=L, randomShifts=100, tolTrueSCI=1/10^5, g=g, weights=weights, 
q=q, pValues=pValues, SE=SE, mu_0=mu_0, alpha=alpha)

[Package informativeSCI version 1.0.3 Index]