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))
}

Try the mase package in your browser

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

mase documentation built on Nov. 28, 2023, 1:08 a.m.