| autoplot.malmquist_meta | R Documentation |
Autoplot Method for Malmquist Meta Objects
## S3 method for class 'malmquist_meta'
autoplot(object, which = c("decomposition", "tgr_evolution", "mpi_trend"), ...)
object |
a |
which |
character. Which plot:
|
... |
additional arguments. |
A ggplot object.
if (requireNamespace("ggplot2", quietly = TRUE)) {
panels <- lapply(1:3, function(t) {
sim <- simulate_metafrontier(n_groups = 2, n_per_group = 30,
seed = 42 + t)
sim$data$time <- t
sim$data$id <- seq_len(nrow(sim$data))
sim$data
})
pdata <- do.call(rbind, panels)
malm <- malmquist_meta(log_y ~ log_x1 + log_x2, data = pdata,
group = "group", time = "time")
ggplot2::autoplot(malm, which = "decomposition")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.