R/pFunc.R

Defines functions pFunc

Documented in pFunc

#' A parametric g formula prediction function
#'
#' This function is used by the pgf function to predict
#' values from model objects.
#' @param mod A model object to predict from.
#' @param ndat The new data to predict from.
#' @keywords g-formula
#' @export
#' @examples
#' pFunc()
pFunc<-function(mod,ndat){as.numeric(predict(mod,newdata=ndat,onlySL=T,type="response")>runif(1))}
ainaimi/pgf documentation built on Jan. 12, 2019, 8:40 p.m.