plot.gfpop | R Documentation |
Plotting inferred segment parameters (the result of gfpop) and data.
## S3 method for class 'gfpop' plot(x, ..., data, multiple = TRUE)
x |
a gfpop class object |
... |
Other parameters |
data |
the data from which we get the gfpop result |
multiple |
if |
plot data and the inferred gfpop segments
n <- 1000 #data length data <- dataGenerator(n, c(0.3, 0.4, 0.7, 0.95, 1), c(1, 3, 1, -1, 4), "mean", sigma = 3) myGraph <- graph(type = "relevant", gap = 0.5, penalty = 2 * sdDiff(data) ^ 2 * log(n)) g <- gfpop(data, myGraph, type = "mean") plot(x = g, data = data, multiple = FALSE) data <- dataGenerator(n, c(0.4, 0.8, 1), c(1, 1.7, 2.3), "exp") g <- gfpop(data,graph(type = "isotonic", penalty = 2 * sdDiff(data) ^ 2 * log(n)), type = "exp") plot(x = g, data = data, multiple = TRUE) data <- dataGenerator(n, c(0.22, 0.75, 1), c(1.4,1,0.8), "poisson") g <- gfpop(data, paperGraph(8), type = "poisson") plot(x = g, data = data, multiple = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.