Description Usage Arguments Value Examples
General Data Usage
1 |
... |
a set of objects to obtain data usage. |
full_data |
Full data that the data passed into |
A data matrix of percentages.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## an example with offsets from Venables & Ripley (2002, p.189)
if (requireNamespace("MASS", quietly = TRUE)) {
utils::data(anorexia, package = "MASS")
sub_anor = anorexia[anorexia$Prewt > 73,]
anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
family = gaussian, data = anorexia[anorexia$Prewt > 70.25,])
anorex.2 <- glm(Postwt ~ Prewt + offset(Prewt),
family = gaussian, data = anorexia)
du(anorex.1, anorex.2, sub_anor, full_data = anorexia)
library(ggplot2)
library(dplyr)
g = anorexia %>%
filter(Prewt > 75 & Postwt < 100) %>%
ggplot(aes(x = Prewt, y = Postwt, colour = Treat))
g2 = anorexia %>%
ggplot(aes(x = Prewt, y = Postwt)) +
geom_point() +
geom_line(data = sub_anor, aes(size = Treat))
du(g, g2, full_data = anorexia)
du(g, g2, anorex.1, anorex.2, list(data = sub_anor), full_data = anorexia)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.