View source: R/sim_cond_normal.R

sim_cond_normal | R Documentation |

Create a helper function to simulate from the conditional normal distribution of new data given old data

```
sim_cond_normal(joint.mean, a, locs_new, locs_obs, kernel, ...)
```

`joint.mean` |
The length |

`a` |
A vector of length |

`locs_new` |
A matrix containing the coordiantes of new locations |

`locs_obs` |
A matrix containing the coordinates of observed locations |

`kernel` |
A function (kernel function) that returns a matrix containing the similarity between the two arguments. |

`...` |
Hyperparameters to pass to the kernel function. |

This serves as a helper function for `spatialGEV_predict`

. The notations are consistent to the notations on the MVN wikipedia page

A function that takes in one argument `n`

as the number of samples to draw from the condition normal distribution
of `locs_new`

given `locs_obs`

: either from `rmvnorm`

for MVN or `rnorm`

for univariate normal. The old and new data are assumed to follow a joint multivariate normal distribution.

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.