parse_cvek_formula: Parsing User-supplied Formula

Description Usage Arguments Details Value Author(s)

View source: R/interface.R

Description

Parsing user-supplied formula to fixed-effect and kernel matrices.

Usage

1
2
3
4
5
6
7
parse_cvek_formula(
  formula,
  kern_func_list,
  data,
  data_new = NULL,
  verbose = FALSE
)

Arguments

formula

(formula) A user-supplied formula.

kern_func_list

(list) A list of kernel functions in the kernel library

data

(data.frame, n*d) A data.frame, list or environment (or object coercible by as.data.frame to a data.frame), containing the variables in formula. Neither a matrix nor an array will be accepted.

data_new

(data.frame, n_new*d) New data for computing predictions.

verbose

(logical) Whether to print additional messages.

Details

The formula object is exactly like the formula for a GLM except that user can use k() to specify kernel terms. Additionally, user can specify interaction between kernel terms (using either '*' and ':'), and exclude interaction term by including -1 on the RHS of formula.

Value

A list of three slots:

Y

(matrix, n*1) The vector of response variable.

X

(matrix, n*d_fix) The fixed effect matrix.

K

(list of matrices) A nested list of kernel term matrices. The first level corresponds to each base kernel function in kern_func_list, the second level corresponds to each kernel term specified in the formula.

Author(s)

Jeremiah Zhe Liu


CVEK documentation built on Jan. 8, 2021, 5:42 p.m.