R/DiffSumObs.R

DiffSumObs <- function (y, tr, tl, ...) {
  ## Difference in number of non-missing observations
  nu0 <- sum(!is.na(y[tr != tl])) ## number of observed control responses
  nu1 <- sum(!is.na(y[tr == tl])) ## number of observed treated responses
  return(nu1 - nu0)
}

Try the NPC package in your browser

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

NPC documentation built on May 2, 2019, 5:07 a.m.