randomizeR (version 3.0.2)

getExpectation: Get expectations of a randomization list

Description

Generates a matrix of the expectations of the included patients in the clinical trial.

Usage

getExpectation(randSeq, issue, endp)

# S4 method for randSeq,missing,survEndp getExpectation(randSeq, endp)

# S4 method for randSeq,missing,expEndp getExpectation(randSeq, endp)

# S4 method for randSeq,missing,normEndp getExpectation(randSeq, endp)

# S4 method for randSeq,power,normEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,chronBias,normEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,chronBias,expEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,chronBias,survEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,chronBias,missing getExpectation(randSeq, issue)

# S4 method for randSeq,selBias,normEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,selBias,expEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,selBias,survEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,selBias,missing getExpectation(randSeq, issue)

# S4 method for randSeq,combinedBias,normEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,combinedBias,expEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,combinedBias,survEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,combinedBiasStepTrend,normEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,combinedBiasStepTrend,expEndp getExpectation(randSeq, issue, endp)

# S4 method for randSeq,combinedBiasStepTrend,survEndp getExpectation(randSeq, issue, endp)

Value

A matrix of the expectations of the included patients in the clinical trial.

Arguments

randSeq

object of the class randSeq.

issue

object of the class issue (optional).

endp

object of the class endpoint (optional).

Details

It is assumed that the expectations of the included patients in a clinical trial can be influenced in three different ways:

  • The strength of selection bias and the guessing strategy of the investigator (see selBias).

  • The strength of a linear time trend, which is described by an object of the class chronBias.

  • The expectations of the investigated treatment groups can be different (see e.g. normEndp).

Examples

Run this code
# get Expectation for a normal endpoint
myPar <- bsdPar(10, 2)
M <- genSeq(myPar, 2)
cs <- selBias("CS", 2, "sim")
endp <- normEndp(mu = c(2, 2), sigma = c(1, 1))
getExpectation(M, cs, endp)

# get Expectation for an exponential endpoint
cs <- selBias("CS", 0.1 , "sim")
endp <- expEndp(lambda = c(0.5, 1), cenTime = 10, cenRate = 0.01)
getExpectation(M, cs, endp)

Run the code above in your browser using DataLab