# Produce posterior samples from one GLM / Cox model

### Description

Based on the result list from `glmBayesMfp`

, for the first model
in the list MCMC samples are produced. In parallel to the sampling of
coefficients and FP curve points, optionally the marginal likelihood of the
model is estimated with MCMC samples. This provides a check of the
integrated Laplace approximation used in the model sampling. If TBF
methodology is used, then no MCMC is necessary, instead ordinary Monte Carlo
samples from an approximate posterior distribution are obtained.

### Usage

1 2 3 4 |

### Arguments

`object` |
the |

`mcmc` |
MCMC options object with class |

`estimateMargLik` |
shall the marginal likelihood be estimated in parallel? (default) Only has an effect if full Bayes and not TBF is used. |

`gridList` |
optional list of appropriately named grid vectors for FP
evaluation. Default is length ( |

`gridSize` |
see above (default: 203) |

`newdata` |
new covariate data.frame with exactly the names (and
preferably ranges) as before (default: no new covariate data) Note that
there is no option for offsets for new data at the moment. Just add the
offsets to the |

`fixedZ` |
either |

`marginalZApprox` |
method for approximating the marginal density of the
log covariance factor z, see |

`verbose` |
should information on computation progress be given? (default) |

`debug` |
print debugging information? (not default) |

`useOpenMP` |
shall OpenMP be used to accelerate the computations? (default) |

`correctedCenter` |
If TRUE predict new data based on the centering of the original data. |

### Value

Returns a list with the following elements:

- samples
an object of S4 class

`GlmBayesMfpSamples`

- coefficients
samples of all original coefficients in the model (nCoefs x nSamples)

- acceptanceRatio
proportion of accepted Metropolis-Hastings proposals

- logMargLik
if

`estimateMargLik`

is`TRUE`

, this list is included: it contains the elements`numeratorTerms`

and`denominatorTerms`

for the numerator and denominator samples of the Chib Jeliazkov marginal likelihood estimate,`highDensityPointLogUnPosterior`

is the log unnormalized posterior density at the fixed parameter and the resulting`estimate`

and`standardError`

.