Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/predict.vagam.R
Takes a fitted vagam object produced by the main vagam function and produces predictions given a new set of values for the model covariates or the original values used for the model fit.
1 2 3 |
object |
An object of class "vagam". |
new.smoothX |
A new matrix of covariates, each of which are were entered as additive smooth terms in the fitted GAM. |
new.paraX |
A new matrix of covariates, each of which were be entered as parametric terms in the fitted GAM. Note the predictions will account for the intercept ONLY if new.paraX is supplied. |
terms |
If |
alpha |
Level of significance for the pointwise confidence bands for predictions. |
type |
When |
... |
This is currently ignored. |
Current implemented a basic method of constructing predictions either for a single smoothing covariate, or across all the smoothing (and parametric if supplied) covariates, based on a GAM fitted using the main vagam function. By default, standard errors and this pointwise confidence bands are also produced based on fitted vagam object. Under the variational approximations framework, the smooths and confidence bands are constructed based on the variational approximation to the posterior distribution of the smoothing coefficients (which are treated as random effects with a normal prior under the mixed model framework). Please see Hui et al., (2018) for more information.
A data frame containing information such as the predicted response, standard errors, and lower and upper bounds of the pointwise confidence bands.
Han Lin Shang [aut, cre, cph] (<https://orcid.org/0000-0003-1769-6430>), Francis K.C. Hui [aut] (<https://orcid.org/0000-0003-0765-3533>)
Hui, F. K. C., You, C., Shang, H. L., and Mueller, S. (2018). Semiparametric regression using variational approximations, Journal of the American Statistical Association, forthcoming.
vagam for the main fitting function
1 | ## Please see examples in the help file for the vagam function.
|
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
Loading required package: gamm4
Loading required package: Matrix
Loading required package: lme4
Attaching package: ‘lme4’
The following object is masked from ‘package:nlme’:
lmList
This is gamm4 0.2-6
Loading required package: mvtnorm
Loading required package: truncnorm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.