relative.effects: Find relative effects for base treatment and comparison...

Description Usage Arguments Value See Also Examples

View source: R/network.summary.R

Description

This function calculates relative effects for base treatment and comparison treatments.

Usage

1
2
3
relative.effects(result, base.treatment = NULL,
  comparison.treatments = NULL, base.category = NULL,
  comparison.categories = NULL, covariate = NULL)

Arguments

result

Object created by network.run function

base.treatment

Base treatment user wants for the relative effects. Base treatment is initially set by Treat.order parameter in network.data (first one in the list). If set to null, default is to use base treatment.

comparison.treatments

Treatments that user wants to compare against base treatment. If set to null, all the treatments besides base treatment is considered as comparison treatments.

base.category

Base category user wants for the relative effects. Only used for multinomial data.

comparison.categories

Category that user wants to compare against base.category. Only used for multinomial data.

covariate

Covariate value at which to compute relative effects. Only used if covariate value is specified in the model.

Value

This returns a mcmc.list sample of relative effects for the base treatment specified. This allows user to obtain relative effects of different base.treatment after the sampling has been done. For a simple summary, use relative.effects.table.

See Also

relative.effects.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#We can fit two different models with different base treatment and we can
#obtain same relative effects estimate using this function
#parkinsons
network <- with(parkinsons, {
 network.data(Outcomes, Study, Treat, SE = SE, response = "normal")
})
result <- network.run(network) 
summary(result)

network2 <- with(parkinsons, {
 network.data(Outcomes, Study, Treat, SE = SE, response = "normal",
 Treat.order = c(2,1,3,4,5))
})
result2 <- network.run(network2)

summary(result)
summary(relative.effects(result2, base.treatment = 1))

#This also works for comparing different base.category for multinomial.
#We fit two different models and compare the estimates again.
#cardiovascular

network3 <- with(cardiovascular, {
 network.data(Outcomes, Study, Treat, N, response = "multinomial")
})
result3 <- network.run(network3)

network4 <- with(cardiovascular, {
 network.data(Outcomes[,c(2,1,3)], Study, Treat, N, response = "multinomial")
})
result4 <- network.run(network4)

summary(result3)
summary(relative.effects(result4, base.category = 2))

MikeJSeo/network-meta documentation built on Nov. 24, 2018, 1:01 p.m.