testHypotheses: Test Multiple Hypotheses

View source: R/Main.R

testHypothesesR Documentation

Test Multiple Hypotheses

Description

Convenience function for testing multiple hypotheses. E.g., for a two factor design, you could test the main effects of A and B plus the interaction of A and B. If using testHypothesis you would need to call that function three times, but this function requires only one function call.

Usage

testHypotheses(prior, post, factors, testedFactors, dmFactors = testedFactors,
  contrastType = NULL, testFunction = testFunction_SDDR,
  usedFactorLevels = NULL, testName = testedFactors)

Arguments

prior

See testHypothesis.

post

See testHypothesis.

factors

See testHypothesis.

testedFactors

Character vector (or list). Interactions should be indicated by putting colons between factor names. For example, the interaction of A and B is given by "A:B". The order of factor names does not matter. If a list, the elements should not be named.

dmFactors

Character vector (or list) of the same length as testedFactors.

contrastType

See testHypothesis.

testFunction

See testHypothesis.

usedFactorLevels

List of data frames. If provided, should be the same length as testedFactors.

testName

Character vector (or list). An optional name for the tests. If provided, should be the same length as testedFactors.

Value

A data.frame with one test on each row.

Examples

## Not run: 
prior = getPrior()
post = getPost()
factors = data.frame(let = c('A', 'A', 'B', 'B'),
num = c('1', '2', '1', '2'))
# Test both main effects and the interaction
testHypotheses(prior, post, factors, 
  testedFactors = c('let', 'num', 'let:num'))


## End(Not run)

hardmanko/CMBBHT documentation built on June 9, 2022, 12:44 a.m.