Description Usage Arguments Details Value See Also Examples
Predicted values based on MASAL model object.
1 2 |
object |
Object of class inheriting from |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
col |
A character vector indicating each column in the |
... |
Further arguments to be passed to |
forecast.masal
produces predicted values, obtained by evaluating
the regression function in the frame newdata
.
forecast.masal
produces a vector of predictions for all rows.
The model fitting function masal
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library("macs")
set.seed(123)
data <- data.frame(ID = sort(rep(1:100, 5)),
X1 = runif(500, min = 0, max = 1),
X2 = runif(500, min = 0, max = 2),
X3 = runif(500, min = 0, max = 4),
X4 = rnorm(500, mean = 0, sd = 1),
X5 = rnorm(500, mean = 0, sd = 2),
X6 = rnorm(500, mean = 0, sd = 3),
time = rep(1:5, 100),
Y = rnorm(500, mean = 40, sd = 10))
result <- masal(data, col = NULL, maxterm = 20, maxinteraction = 2,
varhat = c(1, 1, 1), forced_num = NULL, maxiter = 2)
forecast(result)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.