Description Usage Arguments Value See Also Examples
This function calculates relative effects for base treatment and comparison treatments.
1 2 3 |
result |
Object created by |
base.treatment |
Base treatment user wants for the relative effects. Base treatment is initially set by |
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. |
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
.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.