Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


bayesSurv (version 2.6)

give.init: Check and possibly fill in initial values for the G-spline, augmented observations and allocations for Bayesian models with G-splines

Description

These functions are not to be called by ordinary users.

These are just sub-parts of bayesBisurvreg.priorInit and related functions to make them more readable for the programmer.

Usage

give.init.Gspline(prior, init, mcmc.par, dim)

give.init.y(init.y, dim, y.left, y.right, status)

give.init.y2(init.y, init2.y, dim, design, design2, doubly)

give.init.r(init.r, init.y, dim, KK, gamma, sigma, c4delta, intcpt, scale)

Arguments

prior
a~list as required by prior argument of the function bayesHistogram or prior and prior2 arguments of the function
init
a~list as required by init argument of the function bayesHistogram or by init and init2 arguments of the function
mcmc.par
a~list as required by mcmc.par argument of function bayesHistogram or by mcmc.par and mcmc.par2 arguments of the function
dim
dimension of the G-spline/response, 1 or 2.
init.y
initial (augmented) observations possibly given by the user. They are partially checked for consistency and these supplied by the user used in the resulting object. This should be either vector of len
init2.y
initial (augmented) times-to-event (if doubly censoring) possibly given by the user. They are partially checked for consistency and these supplied by the user used in the resulting object. This should be either vector of l
design
an~object as returned by the function bayessurvreg.design related to either the onset time if doubly censored observations or to the event time. Remark: design$Y contain
design2
an~object as returned by the function bayessurvreg.design related to time-to-event if doubly censored observations. Remark: design2$Y contains original times and NOT the
doubly
logical indicating whether the response is doubly censored or not
y.left
observed, left or right censored log(event time) or the lower limit of the interval censored observation. Sorted in a~transposed order compared to init.y.
y.right
upper limit of the interval censored observation, whatever if the observation is not interval-censored sorted in a~transposed order compared to init.y.
status
status indicator vector/matrix. 1 for observed times, 0 for right censored times, 2 for left censored times, 3 for interval censored times.
init.r
initial allocations possibly given by the user. This should be a~vector of length $n$ where n is a~sample size if dim is equal to 1 and a~matrix with $n$ rows and 2 columns if dim is equal to 2. Values should be on
init.y
correctly computed initial observations the G-spline is estimated from. In the case of regression these should be replaced by residuals. This must be either a~vector or matrix (in the format as returned by the function
KK
vector of length dim with $K$ coefficients defining the G-spline.
gamma
vector of length dim with initial $\gamma$ parameters of the G-spline.
sigma
vector of length dim with initial $\sigma$ parameters of the G-spline.
c4delta
vector of length dim with constants to compute the distance between two knots defining the G-spline.
intcpt
vector of length dim with initial values of the intercept term of the G-spline.
scale
vector of length dim with initial values of the scale parameters of the G-spline.

Value

  • Some lists.

Value for give.init.y

A~vector or matrix with the same structure as init.y, i.e. with 2~columns and $n$ rows in the case of the bivariate data.

Value for give.init.r

To be added somewhen...