summaryGspline2 {glmmAK} | R Documentation |
This function is primarily designed to work
out the MCMC output from functions cumlogitRE
and
logpoissonRE
in which a distribution of the bivariate
random effect was specified as a G-spline. It computes posterior
pointwise mean and quantiles for a G-spline density based on the MCMC output.
Besides the summary for the joint bivariate G-spline density it also directly computes summaries for both marginal G-splines.
summaryGspline2(x1, x2, mu1, mu2, sigma1, sigma2, standard=TRUE, intcpt, scale, probs, values=FALSE, dir=getwd(), wfile="weight.sim", indfile="knotInd.sim", header=TRUE, logw=FALSE, is.indfile=TRUE, skip=0, nwrite)
x1 |
grid of values for the first margin at which we evaluate the G-spline density |
x2 |
grid of values for the second margin at which we evaluate the G-spline density |
mu1 |
a vector with G-spline knots (means of basis G-splines) for the first margin |
mu2 |
a vector with G-spline knots (means of basis G-splines) for the second margin |
sigma1 |
basis standard deviation(s) for the first margin. If a single number is
supplied then it is assumed that all basis G-splines in the first
margin have the same standard deviation. Alternatively a vector of the same length as
mu1 can be given in which case the basis G-splines in the
first margin do not necessarily have the same standard deviations |
sigma2 |
basis standard deviation(s) for the second margin. If a single number is
supplied then it is assumed that all basis G-splines in the second
margin have the same standard deviation. Alternatively a vector of the same length as
mu2 can be given in which case the basis G-splines in the
second margin do not necessarily have the same standard deviations |
standard |
if TRUE then the standardized (zero-mean,
unit-variance) G-splines are computed and summarized |
intcpt |
a two-column matrix with sampled intercept values. If not supplied it
is assumed that all intercepts are equal to zero.
It does not have to be supplied if standard=TRUE .
|
scale |
a two-column matrix with sampled intercept values of the G-spline scale (in most
of my papers denoted by tau) If not supplied it is
assumed that all scale values are equal to one.
It does not have to be supplied if standard=TRUE .
|
probs |
probabilities for which the (pointwise) sample quantiles
of the G-spline should be computed.
If not given only average (and values) of the G-spline are computed |
values |
if TRUE also values of the G-spline at each
(MCMC) iteration are returned.
If FALSE only sample mean (and quantiles) of the G-spline are
returned |
dir |
character giving the directory where the file with (sampled) G-spline (log-)weights is stored |
wfile |
character giving the name of the file with (sampled) G-spline (log-)weights |
indfile |
character giving the name of the file where it is
indicated which G-spline components correspond to non-zero weights.
It does not have to be supplied if is.indfile=FALSE .
|
header |
logical indicating whether the files wfile , indfile
contain a header |
logw |
logical indicating whether the file wfile contains
logarithms of the weights |
is.indfile |
logical.
If TRUE then wfile contains
only the non-zero weights and the G-spline is reconstructed using
indfile .
If FALSE then wfile must contain on
each row weights of all components and indfile is ignored. |
skip |
number of data rows that should be skipped at the beginning of
the files wfile , indfile |
nwrite |
frequency with which is the user informed about the
progress of computation (every nwrite th iteration count of
iterations change) |
A list with the following components
(component values, values1, values2 are
present only when the argument values
was TRUE
).
The description below applies to the situation when probs=0.5
.
summary |
a list with the components
| ||||||||||||||
summary1 |
a data.frame with the following columns
| ||||||||||||||
summary2 |
a data.frame for the second marginal G-spline
having the same structure as summary1. | ||||||||||||||
values |
a matrix with one column for each (x1 , x2 ) value and
number of rows equal to the length of the MCMC. In each row, there
is a joint G-spline density evaluated at one MCMC iteration. | ||||||||||||||
values1 |
a matrix with one column for each x1 value and
number of rows equal to the length of the MCMC. In each row, there
is the first marginal G-spline density evaluated at one MCMC
iteration. | ||||||||||||||
values1 |
a matrix with one column for each x1 value and
number of rows equal to the length of the MCMC. In each row, there
is the second marginal G-spline density evaluated at one MCMC iteration. |
Arnošt Komárek arnost.komarek[AT]mff.cuni.cz
### See ex-Toenail.pdf, ex-Toenail.R ### and ex-Epileptic.pdf, ex-Epileptic.R ### available in the documentation ### to the package