syn_mcmc: Markov Chain Monte Carlo function

View source: R/mcmc_function.R

syn_mcmcR Documentation

Markov Chain Monte Carlo function

Description

A MCMC function that will be useful to obtain the synthetic coordinates. Function "syn_mcmc" receives our database uses variables that we got in the function link:prepare_data to do the mcmc. By the end of this function we get the parameter lambda that will be required when creating the synthetic coordinates.

Usage

syn_mcmc(
  dataset,
  coord,
  limits = c(),
  grid = 10,
  S = 5000,
  burn = 1000,
  continuous = FALSE,
  spatial_beta = FALSE,
  return_parameters = FALSE
)

Arguments

dataset

A data frame with all the information except the coordinates

coord

An object with two columns indicating the longitude and latitude respectively of the elements in the dataset

limits

An object that is a vector of the dimensions where will be create the grids passed through the sequence of xmin, xmax, ymin, ymax. The default is create by using the maximum and the minimum of the coords object.

grid

The grid represents the quantities of divisions that will be made in the location. Bigger the grid, closer the synthetic coordinates are to the real coordinates. With a default result of (grid = 10)

S

Quantities of simulations that will be made. With a default result of (S = 5000)

burn

The number of simulations that will be burned to warm-up the mcmc. With a default result of (burn = 1000)

continuous

Option so the user can warn the function for the presence of continuous variables in the dataset. You must indicate the columns numbers that contain continuous variables in a vector

spatial_beta

Option so the user can choose to use a spatial beta parameter. You must input a vector containing which beta you want to add the spatiality. If you want to select all beta, you can use the logical argument TRUE

return_paramenters

Option to return the result of the parameters. With default not returning the parameters

Value

Depending on the return_parameters parameter, this function can return only the lambda parameter or all other significant parameters too.

References

NUNES, Letícia. Métodos de Simulação de Dados Geográficos Sintéticos Para Bases Confidenciais. *Dissertação de Mestrado*, [s. l.], 2018. Disponível em: :{http//est.ufmg.br/portal/arquivos/mestrado/dissertacoes/dissertacao_Leticia_Silva_Nunes.pdf

Examples

  syn_mcmc(dataset = my_database, S = 2500, burn = 500, return_parameters = TRUE)


leogalhardo/leo_galhardo documentation built on June 13, 2025, 12:40 p.m.