Learn R Programming

crmPack (version 1.0.6)

gain: Compute the gain value with a given dose level, given a pseudo DLE model, a DLE sample, a pseudo Efficacy log-log model and a Efficacy sample

Description

Compute the gain value with a given dose level, given a pseudo DLE model, a DLE sample, a pseudo Efficacy log-log model and a Efficacy sample

Usage

gain(dose, DLEmodel, DLEsamples, Effmodel, Effsamples, ...)

# S4 method for numeric,ModelTox,Samples,Effloglog,Samples gain(dose, DLEmodel, DLEsamples, Effmodel, Effsamples, ...)

# S4 method for numeric,ModelTox,Samples,EffFlexi,Samples gain(dose, DLEmodel, DLEsamples, Effmodel, Effsamples, ...)

# S4 method for numeric,ModelTox,missing,Effloglog,missing gain(dose, DLEmodel, DLEsamples, Effmodel, Effsamples, ...)

Arguments

dose

the dose

DLEmodel

the ModelTox object

DLEsamples

the Samples object (can also be missing)

Effmodel

the Effloglog or the EffFlexi object

Effsamples

the Samples object (can also be missing)

...

unused

Functions

  • gain( dose = numeric, DLEmodel = ModelTox, DLEsamples = Samples, Effmodel = EffFlexi, Effsamples = Samples ): Compute the gain given a dose level, a pseduo DLE model, a DLE sample, the pseudo EffFlexi model and an Efficacy sample

  • gain( dose = numeric, DLEmodel = ModelTox, DLEsamples = missing, Effmodel = Effloglog, Effsamples = missing ): Compute the gain value given a dose level, a pseudo DLE model and a pseudo efficacy model of Effloglog class object without DLE and the efficacy sample

Examples

Run this code
##Obtain the gain value for a given dose, a pseudo DLE model, a DLE sample, 
## a pseudo efficacy model and an efficacy sample
##The DLE model must be from 'ModelTox' class (DLEmodel slot)
emptydata<- DataDual(doseGrid=seq(25,300,25),placebo=FALSE)
data<-emptydata
DLEmodel<-LogisticIndepBeta(binDLE=c(1.05,1.8),DLEweights=c(3,3),DLEdose=c(25,300),data=data)
DLEsamples <- mcmc(data, DLEmodel, McmcOptions(burnin=100,step=2,samples=200))

##The efficacy model must be from 'ModelEff' class (Effmodel slot)
## The DLE and efficayc samples must be from 'Samples' class (DLEsamples and Effsamples slot)
Effmodel<-Effloglog(Eff=c(1.223,2.513),Effdose=c(25,300),nu=c(a=1,b=0.025),data=data,c=0)
Effsamples <- mcmc(data, Effmodel, McmcOptions(burnin=100,step=2,samples=200))

## Given a dose level 75,
gain(dose=75,DLEmodel=DLEmodel,DLEsamples=DLEsamples,Effmodel=Effmodel,Effsamples=Effsamples)
##Obtain the gain value for a given dose, a pseudo DLE model, a DLE sample, 
## the 'EffFlexi' efficacy model and an efficacy sample
##The DLE model must be from 'ModelTox' class (DLEmodel slot)
emptydata<- DataDual(doseGrid=seq(25,300,25))
data<-emptydata
DLEmodel<-LogisticIndepBeta(binDLE=c(1.05,1.8),DLEweights=c(3,3),DLEdose=c(25,300),data=data)
DLEsamples <- mcmc(data, DLEmodel, McmcOptions(burnin=100,step=2,samples=200))

##The efficacy model must be from 'EffFlexi' class (Effmodel slot)
## The DLE and efficayc samples must be from 'Samples' class (DLEsamples and Effsamples slot)
EffFleximodel <- EffFlexi(Eff=c(1.223, 2.513),Effdose=c(25,300),
                     sigma2=c(a=0.1,b=0.1),sigma2betaW=c(a=20,b=50),smooth="RW2",data=data)
Effsamples <- mcmc(data, EffFleximodel, McmcOptions(burnin=100,step=2,samples=200))

## Given a dose level 75,
gain(dose=75,DLEmodel=DLEmodel,DLEsamples=DLEsamples,Effmodel=EffFleximodel,Effsamples=Effsamples)
##Obtain the gain value for a given dose, a pseudo DLE model and  a pseudo efficacy model
## without samples
##The DLE model must be from 'ModelTox' class (DLEmodel slot)
emptydata<- DataDual(doseGrid=seq(25,300,25),placebo=FALSE)
data<-Data(doseGrid=seq(25,300,25),placebo=FALSE)

DLEmodel<-LogisticIndepBeta(binDLE=c(1.05,1.8),DLEweights=c(3,3),DLEdose=c(25,300),data=data)
##The efficacy model must be from 'Effloglog' class  (Effmodel slot)
Effmodel<-Effloglog(Eff=c(1.223,2.513),Effdose=c(25,300),nu=c(a=1,b=0.025),data=emptydata,c=0)
## Given a dose level 75,
gain(dose=75,DLEmodel=DLEmodel,Effmodel=Effmodel)

Run the code above in your browser using DataLab