syncoordinates: Generation of synthetic coordinates

View source: R/synthetic_coordinates_function.R

syncoordinatesR Documentation

Generation of synthetic coordinates

Description

A function that generates synthetic coordinates. Function syncoordinates receives the database, the parameter lambda and the number of synthetic data the user desires. And the function returns the synthetic databases containing the synthetic coordinates.

Usage

syncoordinates(
  dataset,
  coord,
  limits = c(),
  grid = 10,
  continuous = FALSE,
  restricted_area = FALSE,
  coord_restricted_area,
  list_mcmc,
  n.syn = 5
)

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

Object that is a vector of the dimensions where the grid cells will be created, specified by the sequence xmin, xmax, ymin, ymax. The default is to use the maximum and 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)

continuous

An object that indicates which columns in the dataset correspond to continuous variables. The default is FALSE which means that there is none continuous variable. (Still not adapted for cases with more than one continuous variable)

restricted_area

Logical argument indicating whether there are restricted areas where synthetic geographic coordinates should not be generated. The default is FALSE, meaning there are no restricted areas.

coord_restricted_area

Object with two columns indicating the longitude and latitude of the points that form the restricted areas. By default, for the object to be considered a polygon, the first longitude and latitude points must be identical to the last longitude and latitude points.

list_mcmc

Output of the mcmc function

n.syn

Number of synthetic database that will be returned

Value

The return will depend on the argument continuous, if 'continuous = FALSE' the function will return an object of data.frame class containing all new synthetic coordinates, but if 'continuous != FALSE' in addition to the data.frame with the synthetic coordinates the function will return new synthetic data to each continuous variables indicated in argument continuous

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

   syncoordinates(dataset = my_database , coord = my_coords, grid = 10, continuous = FALSE, restricted_area = FALSE, list_mcmc = my_mcmc, n.syn = 5)

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