Description Usage Arguments Details Value References See Also

This function can be used to calculate reasonable values for the hyperparameter `zeta`

, which controls the scale (and median) of the half-Cauchy prior on the global smoothing parameter for the latent field of trend parameters of an `spmrf`

model.

1 2 |

`yvec` |
A vector of observations on the original scale of measurement. |

`mvec` |
For binomial reponse variables only. Is a vector of 'trials' associated with each observed number of 'successes' represented in |

`linkfun` |
The link function associated with the transformation of the expected value of the response (in a generalized linear models sense). Current options are "identity", "log", "logit", and "probit". |

`ncell` |
The number of grid cells. If there is only one observation per grid location (e.g., observation time or covariate value), then this is equal to the total number of observations. Otherwise is equal to the number of unique location values. |

`upBound` |
Upper bound on the expected value of the marginal standard deviations of the latent trend (field) parameters. This value is rarely known |

`alpha` |
The probability of exceeding |

`order` |
The order of the SPMRF model (1, 2, or 3). |

Making `alpha`

smaller will decrease the size of `zeta`

, which will result in smoother latent trends if the information in the data does not overcome the prior information.

The methods for calculation of the hyperparameter `zeta`

are outlined in Faulkner and Minin (2017) and are based on methods introduced by Sorbye and Rue (2014) for setting hyperparameters for the precision of Gaussian Markov random field priors.

A numeric scalar value for the hyperparmeter `zeta`

, where `zeta`

> 0.

Faulkner, J. R., and V. N. Minin. 2017. Locally adaptive smoothing with Markov random fields and shrinkage priors. *Bayesian Analysis* advance publication online.

Sorbye, S. and H. Rue. 2014. Scaling intrinsic Gaussian Markov random field priors in spatial modelling. *Spatial Statistics* 8:39-51.

faulknerjam/bnps documentation built on May 5, 2018, 8:06 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.