sam_MVNORM {bamlss} | R Documentation |

## Create Samples for BAMLSS by Multivariate Normal Approximation

### Description

This sampler function for BAMLSS uses estimated `parameters`

and the Hessian
information to create samples from a multivariate normal distribution. Note that smoothing
variance uncertainty is not accounted for, therefore, the resulting credible intervals
are most likely too narrow.

### Usage

```
sam_MVNORM(x, y = NULL, family = NULL, start = NULL,
n.samples = 500, hessian = NULL, ...)
MVNORM(x, y = NULL, family = NULL, start = NULL,
n.samples = 500, hessian = NULL, ...)
```

### Arguments

`x` |
The |

`y` |
The model response, as returned from function |

`family` |
A bamlss family object, see |

`start` |
A named numeric vector containing possible starting values, the names are based on
function |

`n.samples` |
Sets the number of samples that should be generated. |

`hessian` |
The Hessian matrix that should be used. Note that the row and column names
must be the same as the names of the |

`...` |
Arguments passed to function |

### Value

Function `MVNORM()`

returns samples of parameters. The samples are provided as a
`mcmc`

matrix.

### See Also

`bamlss`

, `bamlss.frame`

,
`bamlss.engine.setup`

, `set.starting.values`

, `opt_bfit`

,
`sam_GMCMC`

### Examples

```
## Simulated data example illustrating
## how to call the sampler function.
## This is done internally within
## the setup of function bamlss().
d <- GAMart()
f <- num ~ s(x1, bs = "ps")
bf <- bamlss.frame(f, data = d, family = "gaussian")
## First, find starting values with optimizer.
o <- with(bf, opt_bfit(x, y, family))
## Sample.
samps <- with(bf, sam_MVNORM(x, y, family, start = o$parameters))
plot(samps)
```

*bamlss*version 1.2-3 Index]