diff --git a/R/secsse_loglik.R b/R/secsse_loglik.R index 22bcecb..edc846d 100644 --- a/R/secsse_loglik.R +++ b/R/secsse_loglik.R @@ -60,15 +60,6 @@ master_loglik <- function(parameter, num_unique_traits = num_modeled_traits, traitStates = traitStates) } - - for (i in 1:nrow(states)) { - v <- sum(states[i, ]) - if (!is.na(v)) { - if (v == 0) { - cat("states entry zero: ", i, states[i, ], "\n") - } - } - } RcppParallel::setThreadOptions(numThreads = num_threads) calcul <- calc_ll_cpp(rhs = if (using_cla) "ode_cla" else "ode_standard", diff --git a/R/secsse_prep.R b/R/secsse_prep.R index e3da043..fcbaeb5 100644 --- a/R/secsse_prep.R +++ b/R/secsse_prep.R @@ -145,6 +145,9 @@ create_q_matrix <- function(state_names, diff.conceal = FALSE) { total_num_states <- length(state_names) + if (total_num_states != num_concealed_states) { + stop("number of concealed states has to be equal to the number of observed states") + } trans_matrix <- matrix(0, ncol = total_num_states, nrow = total_num_states)