Learn R Programming

DynTxRegime (version 3.01)

.newRegime: Process and Store Decision Rule Information.

Description

Given a user defined function specifying the class of decision rules being considered, process and store information. Method is not exported.

Usage

.newRegime(object)
# S4 method for function
.newRegime(object)
# S4 method for list
.newRegime(object)

Arguments

object
A function defining the class of regimes or a list of functions defining the class of regimes at each decision point

Examples

Run this code

regime <- function(a,b,c,data){
            return(a*data$x1 + b*data$x2 + c*data$x3 < 0)
          }

regObj <- DynTxRegime:::.newRegime(object = regime)

is(regObj)

regime <- list()
regime[[1L]] <- function(a,data){
                  return(data$x1 < a)
                }

regime[[2L]] <- function(a,data){
                  return(data$x2 < a)
                }


regObj <- DynTxRegime:::.newRegime(object = regime)

is(regObj)

Run the code above in your browser using DataLab