50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

varycoef (version 0.3.3)

check_cov_lower: Check Lower Bound of Covariance Parameters

Description

Ensures that the covariance parameters define a positive definite covariance matrix. It takes the vector (ρ1,σ12,...,ρq,σq2,τ2) and checks if all ρk>0, all σk2>=0, and τ2>0.

Usage

check_cov_lower(cv, q)

Value

logical(1) with TRUE if all conditions above are fulfilled.

Arguments

cv

(numeric(2*q+1))
Covariance vector of SVC model.

q

(numeric(1))
Integer indicating the number of SVCs.

Examples

Run this code
# first one is true, all other are false
check_cov_lower(c(0.1, 0, 0.2,  1, 0.2), q = 2)
check_cov_lower(c(0  , 0, 0.2,  1, 0.2), q = 2)
check_cov_lower(c(0.1, 0, 0.2,  1, 0  ), q = 2)
check_cov_lower(c(0.1, 0, 0.2, -1, 0  ), q = 2)

Run the code above in your browser using DataLab