R/logl_sand_act.R

Defines functions logl_sand_act

Documented in logl_sand_act

#' Loglikelohood used in sandwich estimator of average causal effect on the treated for DR
#' 
#' Loglikelohood used in sandwich estimator of average causal effect on the treated for DR, support function for \code{\link{ui_causal}}
#' @param x coefficents.
#' @param X Covariate matrix.
#' @param z Missing or not.
#' @importFrom stats pnorm
#' @export
logl_sand_act<-function(x,X,z){
return(mean(z*log(pnorm(X%*%x))+(1-z)*log(1-pnorm(X%*%x))))
}

Try the ui package in your browser

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

ui documentation built on June 25, 2026, 5:09 p.m.