Description Usage Arguments Value Examples
Predicting with new data
1 |
Data |
New data contain explanatory variables in whole model |
MA |
Result of function 'ModelAve()' |
ynew |
Whether a new |
Prediction of data
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
n <- 15
p <-3
X <- matrix(rnorm(n*p), n, p)
beta <- c(1, 2, 3)
y <- X %*% beta+rnorm(n)
y<-data.frame(y)
Data <- cbind(y, data.frame(X))
subset <- matrix(c(1,0,0,0,1,0),ncol=p,byrow = TRUE)
get_MA_nest<-ModelAve(y~., Data[1:10,], method = "MMA", nested = TRUE)
PredictMA(Data[11:15,],get_MA_nest,ynew = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.