q1Diag: Qualitative Correlation or Covariance Kernel with one Input...

Description Usage Arguments Value Note See Also Examples

View source: R/q1Diag.R

Description

Qualitative correlation or covariance kernel with one input and diagonal structure.

Usage

1
q1Diag(factor, input = "x", cov = c("corr", "homo", "hete"), intAsChar = TRUE)

Arguments

factor

A factor with the wanted levels for the covariance kernel object.

input

Name of (qualitative) input for the kernel.

cov

Character telling if the result is a correlation kernel, an homoscedastic covariance kernel or an heteroscedastic covariance kernel with an arbitrary variance vector.

intAsChar

Logical. If TRUE (default), an integer-valued input will be coerced into a character. Otherwise, it will be coerced into a factor.

Value

An object with class "covQual" with d = 1 qualitative input.

Note

The correlation version obtained with cov = "corr" has no parameters.

See Also

q1Symm, q1CompSymm are other covariance structures for one qualitative input.

Examples

1
2
3
4
5
6
7
8
School <- factor(1L:3L, labels = c("Bad", "Mean" , "Good"))

## correlation: no parameter!
myCor <- q1Diag(School, input = "School")

## covariance 
myCov <- q1Diag(School, input = "School", cov = "hete")
coef(myCov) <- c(1.1, 2.2, 3.3)

kergp documentation built on March 18, 2021, 5:06 p.m.