plotcompare | R Documentation |

This function compares the predictive posterior surfaces of two fitted models.

plotcompare( m1, m2, level = 0.95, title = paste("Comparative Predictive Posterior Contours"), m1.name = "Model.1", m2.name = "Model.2", group = NULL, limits.x = c(0, 1), limits.y = c(0, 1), group.colors = c("blue", "red") )

`m1` |
A model fitted to the data. This is an object generated by the metadiag function. |

`m2` |
A second model fitted to the data. This is an object generated by the metadiag function. |

`level` |
Credibility level of the predictive curves. |

`title` |
The title of the plot. |

`m1.name` |
Label of the model 1. |

`m2.name` |
Label of the model 2. |

`group` |
An optional argument, which is a variable name indicating a group factor. This argument is used to compare results from two subgroups. |

`limits.x` |
A vector with the limits of the horizontal axis. |

`limits.y` |
A vector with the limits of the vertical axis. |

`group.colors` |
A character vector with two color names. |

`metadiag`

.

## execute analysis ## Not run: # Comparing results from two models same data data(glas) glas.t <- glas[glas$marker == "Telomerase", 1:4] glas.m1 <- metadiag(glas.t) glas.m2 <- metadiag(glas.t, re = "sm") plotcompare(m1 = glas.m1, m2 = glas.m2) # Comparing results from two models fitted to two subgroups of data: # studies with retrospective design and studies with prospective design data("ct") ct$design = factor(ct$design, labels = c("Prospective", "Retrospective")) m1.ct <- metadiag(ct[ct$design=="Prospective", ]) m2.ct <- metadiag(ct[ct$design=="Retrospective", ]) plotcompare(m1.ct, m2.ct,m1.name = "Retrospective design", m2.name = "Prospective design",group = "design", limits.x = c(0, 0.75), limits.y = c(0.65, 1)) ## End(Not run)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.