Learn R Programming

phase1RMD (version 1.0.9)

parm: Create prior for the phase 1 dose-finding model

Description

parm creates an S3 object of class parm that contains all necessary prior information to estimate the phase I repeated measures model.

Usage

parm(prior = c("gamma", "invgamma", "normal"), 
   mean=0, var=100, shape=0.001, scale=0.001)

Arguments

prior

a symbolic description of the prior distribution (gamma, invgamma, normal).

mean

the prior parameters that are dependent on the distribution that is used. Specifications are gamma(shape, rate), invgamma(shape, scale) and normal(mean,var).

var

the prior parameters that are dependent on the distribution that is used. Specifications are gamma(shape, rate), invgamma(shape, scale) and normal(mean,var).

shape

the prior parameters that are dependent on the distribution that is used. Specifications are gamma(shape, rate), invgamma(shape, scale) and normal(mean,var).

scale

the prior parameters that are dependent on the distribution that is used. Specifications are gamma(shape, rate), invgamma(shape, scale) and normal(mean,var).

Value

An object of class parm, containing information for the prior.

Details

The function parm builds three types of priors: gamma, invgamma and normal.

Gamma parameters:

  • shape : shape parameter for Gamma prior for sigma

  • rate : rate parameter for Gamma prior for sigma

Inverse gamma parameters:

  • shape : shape parameter for the inverse gamma prior on sigma.

  • scale : scale parameter for the inverse gamma prior on sigma.

Normal parameters:

  • mean : mean parameter for the normal prior.)

  • var : variance parameter for the normal prior.)

Examples

Run this code
# NOT RUN {
# Setup the prior distributions for the phase I dose-finding model:
control <- list(
 beta.dose = parm("normal", mean = 0, var = 1000),
 beta.other = parm("normal", mean = 0, var = 1000 ),
 gamma = parm("normal", mean = 0, var = 100 ),
 s2.gamma = parm("invgamma", shape = 0.001, scale = 0.001),
 s2.epsilon = parm("invgamma", shape = 0.001, scale = 0.001)
 )
# }

Run the code above in your browser using DataLab