R/ps.match.R

Defines functions ps.match

Documented in ps.match

## #####################################################
## Function to match data dependent of the class of data
## #####################################################

ps.match <- function(object,
                     object.control     = NULL,
                     matched.by         = NULL,   
                     control.matched.by = matched.by,
                     who.treated        = 1,
                     treat              = NULL,
                     name.match.index   = "match.index",
                     ratio              = 1,
                     caliper            = "logit",
                     x                  = 0.2,
                     givenTmatchingC    = TRUE,
                     bestmatch.first    = TRUE,
                     setseed            = FALSE,
                     combine.output     = TRUE)
{
  if (missing(object))
    stop("Argument 'object' is not given.")
  
  if (any(class(object)=="pscore") |
      any(class(object)=="data.frame"))
    
    UseMethod("ps.match")
  else
    stop("Class of argument 'object' will not supported.")
}

Try the nonrandom package in your browser

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

nonrandom documentation built on May 29, 2017, 11:41 p.m.