R/spa.R

spa <- function(Y,X,C){
  both <- suppressWarnings(ma(cbind(Y=Y,X=X,C=C),partition=list(c(1),c(2,3)))$A)
  one <- suppressWarnings(ma(cbind(Y=Y,C=C),partition=list(c(1),c(2)))$A)
  return (max(both-one,0))
}

Try the matie package in your browser

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

matie documentation built on May 2, 2019, 3:52 a.m.