R/Logl.sandACT.R

Defines functions Logl.sandACT

Documented in Logl.sandACT

#' 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.sandACT<-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 Nov. 11, 2019, 5:07 p.m.