R/margin_build.R

Defines functions margin_build

#calculate predictive margins for different kinds of variables
margin_build <- function(object, newdata = NULL, term = NULL, value = NULL,se = TRUE,se.method = "delta", CI = TRUE, CI.boots = FALSE,level = 0.95,eps = 1e-7,na.action = na.pass,iter = 50){

  if(is.null(newdata)){
    newdata = object@data
  }

  UseMethod("margin_build",newdata[,term])
}

Try the twopartm package in your browser

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

twopartm documentation built on Oct. 14, 2022, 9:06 a.m.