| predict.metafrontier | R Documentation |
Computes predicted frontier values at given input levels using either the metafrontier or a group-specific frontier.
## S3 method for class 'metafrontier'
predict(object, newdata = NULL, type = c("meta", "group"), ...)
object |
a |
newdata |
an optional data frame of new inputs. If omitted, the training data predictions are returned. |
type |
character. |
... |
additional arguments (currently unused). |
A numeric vector of predicted frontier values.
sim <- simulate_metafrontier(n_groups = 2, n_per_group = 50, seed = 42)
fit <- metafrontier(log_y ~ log_x1 + log_x2, data = sim$data,
group = "group", meta_type = "stochastic")
pred <- predict(fit)
# Out-of-sample prediction:
newdata <- data.frame(log_x1 = c(1, 2), log_x2 = c(1.5, 2.5))
predict(fit, newdata = newdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.