plot.DALSM {DALSM} | R Documentation |
DALSM.object
Visualize the estimated additive terms and error density corresponding to a Double Additive Location-Scale Model (DALSM) object.
## 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, ...)
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. |
Plot the fitted additive terms and the estimated standardized error density contained in the DALSM.object
x
.
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
:
a nx
by J1
matrix containing a regular grid of nx
covariate values where the corresponding additive term in location is evaluated.
f.loc
:
a nx
by J1
matrix containing the J1
fitted location additive terms evaluated at x.loc
.
se.loc
:
a nx
by J1
matrix containing the the pointwise standard errors of the fitted location additive terms evaluated at x.loc
.
J2
:
number of additive terms in the dispersion sub-model.
x.disp
:
a nx
by J2
matrix containing a regular grid of nx
covariate values where the corresponding additive term in dispersion is evaluated.
f.disp
:
a nx
by J2
matrix containing the J2
fitted dispersion additive terms evaluated at x.disp
.
se.disp
:
a nx
by J2
matrix containing the pointwise standard errors of the fitted dispersion additive terms evaluated at x.disp
.
Philippe Lambert p.lambert@uliege.be
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>
DALSM
, DALSM.object
, print.DALSM
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)