| sprinvgauss | R Documentation | 
Simulate a spatial inverse gaussian random variable with a specific mean and covariance structure.
sprinvgauss(
  spcov_params,
  dispersion = 1,
  mean = 0,
  samples = 1,
  data,
  randcov_params,
  partition_factor,
  ...
)
| spcov_params | An  | 
| dispersion | The dispersion value. | 
| mean | A numeric vector representing the mean.  | 
| samples | The number of independent samples to generate. The default
is  | 
| data | A data frame or  | 
| randcov_params | A  | 
| partition_factor | A formula indicating the partition factor. | 
| ... | Additional arguments passed to  | 
The values of spcov_params, mean, and randcov_params
are assumed to be on the link scale. They are used to simulate a latent normal (Gaussian)
response variable using sprnorm(). This latent variable is the
conditional mean used with dispersion to simulate a inverse gaussian random variable.
If samples is 1, a vector of random variables for each row of data
is returned. If samples is greater than one, a matrix of random variables
is returned, where the rows correspond to each row of data and the columns
correspond to independent samples.
spcov_params_val <- spcov_params("exponential", de = 0.2, ie = 0.1, range = 1)
sprinvgauss(spcov_params_val, data = caribou, xcoord = x, ycoord = y)
sprinvgauss(spcov_params_val, samples = 5, data = caribou, xcoord = x, ycoord = y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.