plot.DALSM {DALSM} | R Documentation |
Plot visual information on a DALSM.object
Description
Visualize the estimated additive terms and error density corresponding to a Double Additive Location-Scale Model (DALSM) object.
Usage
## S3 method for class 'DALSM'
plot(x,
mfrow.loc=NULL, mfrow.disp=NULL,
nx=101, equal.ylims=TRUE, true.loc=NULL,true.disp=NULL, ci.level=NULL,
error.lim = NULL, add.residuals=FALSE, true.derr=NULL, new.dev=TRUE, ...)
Arguments
x |
a |
mfrow.loc |
(optional) window layout to plot the additive terms for location. |
mfrow.disp |
(optional) window layout to plot the additive terms for dispersion. |
nx |
(optional) number of points to make the plots for the fitted additive terms (default: 101). |
equal.ylims |
logical indicating if the same y-limits must be used when plotting the fitted additive terms (default: TRUE). |
true.loc |
(optional) list of functions to be superposed to the corresponding estimated additive terms in the location submodel (default: NULL). |
true.disp |
(optional) list of functions to be superposed to the corresponding estimated additive terms in the dispersion submodel (default: NULL). |
ci.level |
(optional) nominal level for the plotted pointwise credible intervals (default: x$ci.level). |
error.lim |
(optional) plotting interval for the estimated standardized error density in the DALSM model (default: support of the fitted standardized error density). |
add.residuals |
logical requesting to add the (possibly censored) standardized residuals to the plot of the fitted standardized error density (default: FALSE). |
true.derr |
(optional) density function to superpose to the estimated standardized error density when plotting (default: NULL). |
new.dev |
(optional) logical indicating whether a new plotting device must be opened for each graph (default: TRUE). |
... |
additional generic plotting arguments. |
Details
Plot the fitted additive terms and the estimated standardized error density contained in the DALSM.object
x
.
Value
In addition to the plots, an invisible list containing the following is returned:
J1
:
number of additive terms in the location sub-model.x.loc
:
anx
byJ1
matrix containing a regular grid ofnx
covariate values where the corresponding additive term in location is evaluated.f.loc
:
anx
byJ1
matrix containing theJ1
fitted location additive terms evaluated atx.loc
.se.loc
:
anx
byJ1
matrix containing the the pointwise standard errors of the fitted location additive terms evaluated atx.loc
.J2
:
number of additive terms in the dispersion sub-model.x.disp
:
anx
byJ2
matrix containing a regular grid ofnx
covariate values where the corresponding additive term in dispersion is evaluated.f.disp
:
anx
byJ2
matrix containing theJ2
fitted dispersion additive terms evaluated atx.disp
.se.disp
:
anx
byJ2
matrix containing the pointwise standard errors of the fitted dispersion additive terms evaluated atx.disp
.
Author(s)
Philippe Lambert p.lambert@uliege.be
References
Lambert, P. (2021). Fast Bayesian inference using Laplace approximations in nonparametric double additive location-scale models with right- and interval-censored data. Computational Statistics and Data Analysis, 161: 107250. <doi:10.1016/j.csda.2021.107250>
See Also
DALSM
, DALSM.object
, print.DALSM
Examples
require(DALSM)
data(DALSM_IncomeData)
resp = DALSM_IncomeData[,1:2]
fit = DALSM(y=resp,
formula1 = ~twoincomes+s(age)+s(eduyrs),
formula2 = ~twoincomes+s(age)+s(eduyrs),
data = DALSM_IncomeData)
plot(fit)