R/helper_poi.R

Defines functions .constrvec_poi .constrmat_poi

.constrmat_poi <- function(p) {
  mat <- array(0, c(p + 2, p + 1))
  mat[1:(p + 1), 1:(p + 1)] <- diag(1, p + 1)
  mat[p + 2, 1:p] <- (-1)
  mat
}

.constrvec_poi <- function(p) {
  vec <- rep(0, p + 2)
  vec[p + 2] <- (-1)
  vec
}

Try the spINAR package in your browser

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

spINAR documentation built on May 29, 2024, 5:55 a.m.