bayessurvreg1.files2init {bayesSurv} | R Documentation

## Read the initial values for the Bayesian survival regression model to the list.

### Description

This function creates the list of initial values as required by the `init` argument of the function `bayessurvreg1`. The initials are taken from the files that are of the form of the files where the simulated values from the McMC run performed by the function `bayessurvreg1` are stored. The files are assumed to have the following names: "iteration.sim", "mixmoment.sim", "mweight.sim", "mmean.sim", "mvariance.sim", "beta.sim", "b.sim", "Y.sim", "r.sim", "D.sim", "otherp.sim", "u.sim". Some of these files may be missing. In that case, the corresponding initial is filled by `NULL`.

### Usage

    bayessurvreg1.files2init(dir = getwd(), row, kmax)

### Arguments

`dir` | string giving the directory where it will be searched for the files with initial values.
`row` | the row (possible header does not count) from the files with the values that will be considered to give the initial values. By default, it is the last row from the files.
`kmax` | maximal number of mixture components. This must be given only if `header == FALSE`.

### Value

A list with components called "iter", "mixture", "beta", "b", "D", "y", "r", "otherp", "u" in the form as required by the argument `init` of the function `bayessurvreg1`.

### Author(s)

Arnost Komarek arnost.komarek@med.kuleuven.be

[Package bayesSurv version 0.4 Index]