R/check_legal_constraints.R

Defines functions check_legal_constraints_cj

check_legal_constraints_cj <- function(hyp_mat, n_constraints, numAR){
  hyp_mat_and_neg <- rbind(hyp_mat, -1*hyp_mat)

  same_constraints <- duplicated(hyp_mat_and_neg[, -ncol(hyp_mat_and_neg)])
  same_constant <- duplicated(hyp_mat_and_neg)
  if(!all(same_constraints == same_constant)) error <- 2
}

Try the bain package in your browser

Any scripts or data that you put into this service are public.

bain documentation built on Sept. 27, 2023, 5:06 p.m.