Skip to contents

User-defined time-course function

Usage

tuser(
  fun,
  pool.1 = "rel",
  method.1 = "common",
  pool.2 = "rel",
  method.2 = "common",
  pool.3 = "rel",
  method.3 = "common",
  pool.4 = "rel",
  method.4 = "common"
)

Arguments

fun

A formula specifying any relationship including time and one/several of: beta.1, beta.2, beta.3, beta.4.

pool.1

Pooling for beta.1. Can take "common, "random", or be assigned a numeric value (see details).

method.1

Method for synthesis of beta.1. Can take "common or "random" (see details).

pool.2

Pooling for beta.2. Can take "common, "random", or be assigned a numeric value (see details).

method.2

Method for synthesis of beta.2. Can take "commonor"random"` (see details).

pool.3

Pooling for beta.3. Can take "common, "random", or be assigned a numeric value (see details).

method.3

Method for synthesis of beta.3. Can take "commonor"random"` (see details).

pool.4

Pooling for beta.4. Can take "common, "random", or be assigned a numeric value (see details).

method.4

Method for synthesis of beta.4. Can take "common, "random", or be assigned a numeric value (see details).

Value

An object of class("timefun")

Time-course parameters

Time-course parameters in the model must be specified using a pool and a method prefix.

pool is used to define the approach used for pooling of a given time-course parameter and can take any of:

ArgumentModel specification
"rel"Indicates that relative effects should be pooled for this time-course parameter. Relative effects preserve randomisation within included studies, are likely to vary less between studies (only due to effect modification), and allow for testing of consistency between direct and indirect evidence. Pooling follows the general approach for Network Meta-Analysis proposed by Lu and Ades (2004) .
"abs"Indicates that study arms should be pooled across the whole network for this time-course parameter independently of assigned treatment to estimate an absolute effect. This implies estimating a single value across the network for this time-course parameter, and may therefore be making strong assumptions of similarity.

method is used to define the model used for meta-analysis for a given time-course parameter and can take any of the following values:

ArgumentModel specification
"common"Implies that all studies estimate the same true effect (often called a "fixed effect" meta-analysis)
"random"Implies that all studies estimate a separate true effect, but that each of these true effects vary randomly around a true mean effect. This approach allows for modelling of between-study heterogeneity.
numeric()Assigned a numeric value, indicating that this time-course parameter should not be estimated from the data but should be assigned the numeric value determined by the user. This can be useful for fixing specific time-course parameters (e.g. Hill parameters in Emax functions, power parameters in fractional polynomials) to a single value.

When relative effects are modelled on more than one time-course parameter, correlation between them is automatically estimated using a vague inverse-Wishart prior. This prior can be made slightly more informative by specifying the scale matrix omega and by changing the degrees of freedom of the inverse-Wishart prior using the priors argument in mb.run().

References

Lu G, Ades AE (2004). “Combination of direct and indirect evidence in mixed treatment comparisons.” Stat Med, 23(20), 3105-24. ISSN 0277-6715 (Print) 0277-6715 (Linking), doi:10.1002/sim.1875 , https://pubmed.ncbi.nlm.nih.gov/15449338/.

Examples


timecourse <- ~ beta.1 * (1/(time+1)) + beta.2 * time^2
tuser(fun=timecourse,
  pool.1="abs", method.1="common",
  pool.2="rel", method.2="common")
#> $name
#> [1] "user"
#> 
#> $fun
#> ~beta.1 * (1/(time + 1)) + beta.2 * time^2
#> <environment: 0x5570074c8fa8>
#> 
#> $latex
#> NULL
#> 
#> $params
#> [1] "beta.1" "beta.2"
#> 
#> $nparam
#> [1] 2
#> 
#> $jags
#> [1] "beta.1 * (1/(time[i,m] + 1)) + beta.2[i,k] * time[i,m]^2"
#> 
#> $apool
#> beta.1 beta.2 
#>  "abs"  "rel" 
#> 
#> $amethod
#>   beta.1   beta.2 
#> "common" "common" 
#> 
#> $bname
#> [1] "beta.1" "beta.2"
#> 
#> $bpool
#>   beta.1   beta.2 
#> "pool.1" "pool.2" 
#> 
#> $bmethod
#>     beta.1     beta.2 
#> "method.1" "method.2" 
#> 
#> attr(,"class")
#> [1] "timefun"