approximator (version 1.2-7)

c.fun: Correlations between points in parameter space

Description

Correlation matrices between (sets of) points in parameter space, both prior (c_fun()) and posterior (cdash.fun()).

Usage

c_fun(x, xdash=x, subsets, hpa)
cdash.fun(x, xdash=x, V=NULL, Vinv=NULL, D1, subsets, basis, hpa, method=2)

Value

Returns a matrix of covariances

Arguments

x,xdash

Points in parameter space; or, if a matrix, interpret the rows as points in parameter space. Note that the default value of xdash (viz x) will return the variance-covariance matrix of a set of points

D1

Design matrix

subsets

Subset object

hpa

hyperparameter object

basis

Basis function

V,Vinv

In function cdash.fun(), the data covariance matrix and its inverse. If NULL, the matrix will be calculated from scratch. Supplying a precalculated value for V, and especially Vinv, makes for very much faster execution (edepending on method)

method

Integer specifying which of several algebraically identical methods to use. See the source code for details, but default option 2 seems to be the best. Bear in mind that option 3 does not require inversion of a matrix, but is not faster in practice

Author

Robin K. S. Hankin

References

KOH2000

See Also

Afun

Examples

Run this code
data(toyapps)

x <- latin.hypercube(4,3)
rownames(x) <- c("ash" , "elm" , "oak", "pine")
xdash <- latin.hypercube(7,3)
rownames(xdash) <- c("cod","bream","skate","sole","eel","crab","squid")

cdash.fun(x=x,xdash=xdash, D1=D1.toy, basis=basis.toy,subsets=subsets.toy, hpa=hpa.toy)

# Now add a point whose top-level value is known:
x <- rbind(x,D1.toy[subsets.toy[[4]][1],])

cdash.fun(x=x,xdash=xdash, D1=D1.toy, basis=basis.toy,subsets=subsets.toy, hpa=hpa.toy)
# Observe how the bottom row is zero (up to rounding error)

Run the code above in your browser using DataLab