give.init: Check and possibly fill in initial values for the G-spline,...

give.initR Documentation

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 bayesBisurvreg

init

a~list as required by init argument of the function bayesHistogram or by init and init2 arguments of the function bayesBisurvreg

mcmc.par

a~list as required by mcmc.par argument of function bayesHistogram or by mcmc.par and mcmc.par2 arguments of the function bayesBisurvreg

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 length n where n is a~sample size if the dimension is one or a~matrix with 2 columns and n rows if the dimension is two.

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 length n where n is a~sample size if the dimension is one or a~matrix with 2 columns and n rows if the dimension is two.

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 contains original times and NOT their logarithmic transformations.

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 their logarithmic transformations.

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 the scale -K_j,\dots,K_j, j=1,\dots,dim

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.Gspline

A~list with the following components:

Gparmi

integer parameters for the G-spline constructor in the C++ code

Gparmd

double parameters for the G-spline constructor in the C++ code

specification

specification of the G-spline model (1 or 2), see bayesHistogram for more detail

and the following attributes:

init
prior
mcmc.par

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.y2

A~list with the following components:

init.y

a~vector of length n or a~matrix with 2 columns and n rows with initial log(onset times)

init2.y

a~vector of length n or a~matrix with 2 columns and n rows with initial log(times-to-event). If the data are not doubly cdensored, this object is equal to 0.

y1.left

lower limit of the log-response (or exact/right/left censored observation) as required by the C++ function bayesBisurvreg, related to the onset time in the case of doubly censoring and to the event time otherwise

y1.right

upper limit of the log-response as required by the C++ function bayesBisurvreg, related to the onset time in the case of doubly censoring and to the event time otherwise

status1

status vector as required by the C++ function bayesBisurvreg related to the onset time in the case of doubly censoring and to the event time otherwise

t2.left

lower limit of the response as required by the C++ function bayesBisurvreg, related to time-to-event in the case of doubly censoring, equal to 0 if there is no doubly-censoring

t2.right

upper limit of the response as required by the C++ function bayesBisurvreg, related to time-to-event in the case of doubly censoring, equal to 0 if there is no doubly-censoring

status2

status vector related to time-to-event in the case of doubly censoring, equal to 0 otherwise.

Value for give.init.r

To be added somewhen...

Author(s)

Arnošt Komárek arnost.komarek@mff.cuni.cz


bayesSurv documentation built on Sept. 30, 2024, 9:34 a.m.