timeplot {MBNMAtime} | R Documentation |
Plot raw responses over time by treatment or class
Description
Plot raw responses over time by treatment or class
Usage
timeplot(network, level = "treatment", plotby = "arm", link = "identity", ...)
Arguments
network |
An object of class |
level |
A string indicating whether nodes/facets should represent |
plotby |
A character object that can take either |
link |
Can take either |
... |
Arguments to be sent to |
Details
Plots can be faceted by either treatment (level="treatment"
) or class
(level="class"
) to investigate similarity of treatment responses within classes/agents.
Points represent observed responses and lines connect between observations within the
same study and arm.
Value
The function returns an object of class(c("gg", "ggplot")
. Characteristics
of the object can therefore be amended as with other plots generated by ggplot()
.
Examples
# Make network
goutnet <- mb.network(goutSUA_CFB)
# Use timeplot to plot responses grouped by treatment
timeplot(goutnet)
# Use timeplot ot plot resposes grouped by class
timeplot(goutnet, level="class")
# Plot matrix of relative effects
timeplot(goutnet, level="class", plotby="rel")
# Plot using Standardised Mean Differences
copdnet <- mb.network(copd)
timeplot(copdnet, plotby="rel", link="smd")