R/htt.R

Defines functions htt

#Helper function to compute HT total for bootstrapping

htt <- function(data,  indices){
  #data: 1st column:y, 2nd column:pis, rest: xsample_d
  d <- data[indices,]
  
  #y
  y <- d[,1]
  
  #pis 
  pis <- d[,2]
  
  return(pis^{-1} %*% as.vector(y))
}
Swarthmore-Statistics/mase documentation built on March 5, 2024, 6:16 a.m.