
Qualitative correlation or covariance kernel with one input and diagonal structure.
q1Diag(factor, input = "x", cov = c("corr", "homo", "hete"), intAsChar = TRUE)
An object with class "covQual"
with d = 1
qualitative
input.
A factor with the wanted levels for the covariance kernel object.
Name of (qualitative) input for the kernel.
Character telling if the result is a correlation kernel, an homoscedastic covariance kernel or an heteroscedastic covariance kernel with an arbitrary variance vector.
Logical. If TRUE
(default), an integer-valued input will be
coerced into a character. Otherwise, it will be coerced into a factor.
q1Symm
, q1CompSymm
are other covariance
structures for one qualitative input.
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)
Run the code above in your browser using DataLab