checkX-methods {kergp}R Documentation

Check the Compatibility of a Design with a Given Covariance Object

Description

Check the compatibility of a design matrix with a covariance object.

Usage


   ## S4 method for signature 'covAll'
checkX(object, X, strict = FALSE, ...)

Arguments

object

A covariance kernel object.

X

A design matrix or data frame.

strict

Logical. If TRUE, the character vectors colnames(X) and inputNames(object) must be the same sets, and hence have the same length. If FALSE the vector inputNames(object) must be a subset of colnames(X) which then can have unused columns.

...

Not used yet.

Details

The matrix X must have the number of columns expected from the covariance kernel object description, and it must have named columns conforming to the kernel input names as returned by the inputNames method. If the two sets of names are identical but the names are in a different order, the columns are permuted in order to be in the same order as the input names. If the names sets differ, an error occurs.

Value

A matrix with columns names identical to the input names attached with the kernel object, i.e. inputNames(object). The columns are copies of those found under the same names in X, but are put in the order of inputNames(object). When an input name does not exist in colnames(X) an error occurs.

See Also

The inputNames method.


[Package kergp version 0.5.7 Index]