bayesGspline {bayesSurv} | R Documentation |
Summary for the density estimate based on the model with Bayesian G-splines.
Description
Compute the estimate of the density function based on the values sampled using the MCMC (MCMC average evaluated in a grid of values) in a model where density is specified as a Bayesian G-spline.
This function serves to summarize the MCMC chains related to the distributional parts
of the considered models obtained using the functions:
bayesHistogram
,
bayesBisurvreg
, bayessurvreg2
, bayessurvreg3
.
If asked, this function returns also the values of the G-spline evaluated in a grid at each iteration of MCMC.
Usage
bayesGspline(dir, extens="", extens.adjust="_b",
grid1, grid2, skip = 0, by = 1, last.iter, nwrite,
only.aver = TRUE, standard = FALSE, version = 0)
Arguments
dir |
directory where to search for files (‘mixmoment.sim’, ‘mweight.sim’, ‘mmean.sim’, ‘gspline.sim’) with the MCMC sample. | ||
extens |
an extension used to distinguish different sampled
G-splines if more G-splines were used in one simulation (e.g. with
doubly-censored data or in the model where both the error term and the
random intercept were defined as the G-splines). According to which
| ||
extens.adjust |
this argument is applicable for the situation when
the MCMC chains were created using the function
In that case the location of the error term and the random intercept
are separately not identifiable. Only the location of the sum
Argument The following values of
| ||
grid1 |
grid of values from the first dimension at which the sampled densities are to be evaluated. | ||
grid2 |
grid of values from the second dimension (if the G-spline
was bivariate) at which the sampled densities are to be
evaluated. This item is | ||
skip |
number of rows that should be skipped at the beginning of each *.sim file with the stored sample. | ||
by |
additional thinning of the sample. | ||
last.iter |
index of the last row from *.sim files that should be
used. If not specified than it is set to the maximum available
determined according to the file | ||
nwrite |
frequency with which is the user informed about the
progress of computation (every | ||
only.aver |
| ||
standard |
| ||
version |
this argument indicates by which
|
Value
An object of class bayesGspline
is returned. This object is a
list with components
grid
, average
for the univariate G-spline and
components grid1
, grid2
, average
for the bivariate G-spline.
grid |
this is a grid of values (vector) at which the McMC average of the G-spline was computed. | ||||||||||||||||||
average |
these are McMC averages of the G-spline (vector) evaluated in
| ||||||||||||||||||
grid1 |
this is a grid of values (vector) for the first dimension at which the McMC average of the G-spline was computed. | ||||||||||||||||||
grid2 |
this is a grid of values (vector) for the second dimension at which the McMC average of the G-spline was computed. | ||||||||||||||||||
average |
this is a matrix
and
|
There exists a method to plot objects of the class bayesGspline
.
Attributes
Additionally, the object of class bayesGspline
has the following
attributes:
sample.size
a length of the McMC sample used to compute the McMC average.
sample
G-spline evaluated in a grid of values. This attribute is present only if
only.aver = FALSE
.For a univariate G-spline this is a matrix with
sample.size
columns and length(grid1) rows.For a bivariate G-spline this is a matrix with
sample.size
columns and length(grid1)*length(grid2) rows.
Author(s)
Arnošt Komárek arnost.komarek@mff.cuni.cz
References
Komárek, A. (2006). Accelerated Failure Time Models for Multivariate Interval-Censored Data with Flexible Distributional Assumptions. PhD. Thesis, Katholieke Universiteit Leuven, Faculteit Wetenschappen.
Komárek, A. and Lesaffre, E. (2006). Bayesian semi-parametric accelerated failurew time model for paired doubly interval-censored data. Statistical Modelling, 6, 3–22.
Komárek, A. and Lesaffre, E. (2008). Bayesian accelerated failure time model with multivariate doubly-interval-censored data and flexible distributional assumptions. Journal of the American Statistical Association, 103, 523–533.
Komárek, A., Lesaffre, E., and Legrand, C. (2007). Baseline and treatment effect heterogeneity for survival times between centers using a random effects accelerated failure time model with flexible error distribution. Statistics in Medicine, 26, 5457–5472.
Examples
## See the description of R commands for
## the models described in
## Komarek (2006),
## Komarek and Lesaffre (2006),
## Komarek and Lesaffre (2008),
## Komarek, Lesaffre, and Legrand (2007).
##
## R commands available
## in the documentation
## directory of this package
## - ex-tandmobPA.R and
## https://www2.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobPA.pdf
## - ex-tandmobCS.R and
## https://www2.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobCS.pdf
## - ex-eortc.R and
## https://www2.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-eortc.pdf
##