subsets.fun {approximator}R Documentation

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

Author(s)

Robin K. S. Hankin (subsets.fun()); Peter Dalgaard (via R-help)

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

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

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

[Package approximator version 1.2-8 Index]