iso_simulation_by_heriability: A simulation fucntion for isotrophic spatial data

Description Usage Arguments Examples

View source: R/iso_simulation_by_heritabilitiy.R

Description

The function simulates spatial data by given parameters

Usage

1
2
3
4
5
6
iso_simulation_by_heriability(n.row, n.col, lon.lat = FALSE, mile = FALSE,
  density.choice, density.layout = c("diagSet", "random", "equal_space",
  "p_rep"), h2, sigma_env, sigma_variety = (sigma_env * h2)/(1 - h2),
  mu_variety, mu_check = mu_variety + 1.68 * sqrt(sigma_variety),
  cov_fun = "exp", ranges = sqrt(2), simulation = 3, nugget = 0,
  mu_floor = 0, p_rep_check = 0.05)

Arguments

n.row

(Mandatory) The row of the field grid

n.col

(Mandatory) The column of the fields grid

lon.lat

(Optional) The distance calculation is based on earth distance (if TRUE), default is FALSE

mile

(Optional) The distance calculation is based on milage (if TRUE), default is FALSE

density.choice

(Mandatory) The density of the checks, a vector (range from 0 to 1)

density.layout

(Optional) The layout pattern of density, default are: 'diagonal', 'diagSet', 'random', 'equal_space', 'p_rep'. The diagSet is recommended over the diagonal at density from 0.01 to 0.35.

h2

(Mandatory) The heritability of the simulated data, h2 = sigma_variety / (sigma_variety + sigma_env)

sigma_env

(Mandatory) The variance of environment, (equilievent of sill)

sigma_variety

(Optional) The variance of entry, default sigma_variety = (sigma_env * h2) / (1 - h2)

mu_variety

(Mandatory) The mean of the variety

mu_check

(Optional) The mean value of checks, default mu_check = 1.68 * sqrt(sigma_variety)

cov_fun

(Optional) The var-cov function ('exp' or 'gau'), default is 'exp', exponential

ranges

(Optional) The range parameter of spatial distribution, default sqrt(2)

simulation

(Optional) The number of simulated data returned, default 3

nugget

(Optional) The nugget parameter in spatial simulation, default 0

mu_floor

(Optional) The mean of the spatial floor, default 0

p_rep_check

The density of checks in the p rep design, default 0.05

Examples

1
2
3
4
5
6
temp.1 = iso_simulation_by_heriability(20, 20, density.choice=c(0.05)
			, density.layout=c('diagSet', 'random')
			, h2=0.5, sigma_env=100, mu_variety=300)
temp.2 = iso_simulation_by_heriability(20, 20, density.choice=c(0.05)
			, density.layout=c('diagSet', 'random')
			, h2=0.5, sigma_env=100, mu_variety=300)

SpatialFloor documentation built on May 2, 2019, 1:45 p.m.