Description Usage Arguments Value Author(s) See Also Examples
Function to check whether the argument is coherent and in the correct format.
1 |
theta |
A list on the |
check.class |
Logical. If |
logical
. Returns TRUE
if theta
is coherent and
in the correct format. Otherwise, the function returns FALSE
with
an accompanying warning message of the problem.
Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | theta1 <- rtheta() # Create a random correctly formatted theta
is.theta(theta1)
theta2 <- rtheta(d = 3, m = 5)
theta2$m <- 6 # m is now incoherent with the number of components
is.theta(theta2)
theta3 <- rtheta(d = 4, m = 2)
theta3$sigma$comp1[1, 2] <- 0 # Making the covariance matrix non-symmetric
is.theta(theta3)
theta4 <- rtheta(d = 10, m = 10)
theta4$sigma$comp1[1, 1] <- 0 # Destroy positive semi-definiteness
is.theta(theta4)
theta5 <- rtheta()
names(theta5) <- c("m", "d", "prop", "mu", "sigmas") # Incorrect names
is.theta(theta5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.