Description Usage Arguments Value Examples

Obtain predicted values from `ipriorMod`

objects

1 2 3 4 5 6 7 8 9 10 |

`object, x` |
An |

`intervals` |
Logical. Calculate the credibility intervals for the fitted
values. Defaults to |

`alpha` |
The significance level for the credibility intervals. This is a number between 0 and 1. |

`...` |
Not used. |

`newdata` |
Either a data frame when using formula method, or a list of vectors/matrices if using default method. Either way, the new data must be structurally similar to the original data used to fit the model. |

`y.test` |
(Optional) Test data, in order to compute test error rates. |

`rows` |
(Optional) The number of values/rows to display. |

`dp` |
(Optional) Decimal places for the values. |

A list of class `ipriorPredict`

containing the fitted values,
residuals (observed minus fitted), the training mean squared error, and the
lower and upper intervals (if called).

1 2 3 4 5 6 7 8 9 10 11 | ```
dat <- gen_smooth(20)
mod <- iprior(y ~ ., dat, kernel = "se")
fitted(mod)
fitted(mod, intervals = TRUE)
predict(mod, gen_smooth(5))
with(dat, mod <<- iprior(y, X, kernel = "poly"))
newdat <- gen_smooth(30)
mod.pred <- predict(mod, list(newdat$X), y.test = newdat$y, intervals = TRUE)
str(mod.pred)
print(mod.pred, row = 5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.