Learn R Programming

BACCO (version 1.1-4)

subsets.fun: Generate and test subsets

Description

Create a list of subsets (subsets.fun()); or, given a list of subsets, test for correct inclusion (is.nested()), or strict inclusion (is.strict()).

Usage

is.nested(subsets)
is.strict(subsets)
subsets.fun(n, levels = 4, prob = 0.7)

Arguments

subsets
In is.nested(), a list of subsets to be tested
n
Number of observations in the lowest level (ie level 1, the fastest code)
levels
Number of levels
prob
Probability of choosing an observation at level $n+1$ given that there is one at the same place at level $n$

References

M. C. Kennedy and A. O'Hagan 2000. Predicting the output from a complex computer code when fast approximations are available Biometrika, 87(1): pp1-13

Examples

Run this code
is.nested(subsets.fun(20))  # Should be TRUE

data(toyapps)
stopifnot(is.nested(subsets.toy))

Run the code above in your browser using DataLab