simu_nbio: Simulation functions

Description Usage Arguments Details Functions Examples

View source: R/scr_simulations.R

Description

Simulation functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
simu_nbio(
  method = c("lda", "nb", "ml"),
  nrep = 100,
  mxcb = 10,
  nsample = 10,
  ndistr = 20,
  noise = 0,
  pca = FALSE,
  mx_bio = 17,
  ...
)

simu_nbio_order(
  method = c("lda", "nb", "ml"),
  nrep = 100,
  nsample = 10,
  ndistr = 20,
  noise = 0
)

simu_ndistr(
  method = c("lda", "nb", "ml"),
  nrep = 20,
  mxcb = 20,
  nbio = 5,
  nsample = 1,
  noise = 0,
  pca = FALSE
)

simu_nsample(
  method = c("lda", "nb", "ml"),
  nrep = 20,
  mxcb = 20,
  nbio = 5,
  ndistr = 20,
  noise = 0,
  pca = FALSE
)

simu_noise(
  method = c("lda", "nb", "ml"),
  nrep = 20,
  mxcb = 20,
  nbio = 5,
  ndistr = 20,
  nsample = 5,
  pca = FALSE
)

simu_all(
  method = c("lda", "nb", "ml"),
  nrep = 10000,
  mxcb = 700,
  nsample = 1,
  ndistr = 20,
  noise = 0,
  pca = FALSE,
  mx_bio = 17,
  ...
)

Arguments

method

statistical approach, either "lda", "nb" or "ml".

nrep

number of repetition for every iterations.

mxcb

maximum number of bio-tracers combinations (see details).

nsample

number of samples (individuals) to be tested (per region).

ndistr

number of individuals used to generate distributions (per region).

noise

noise to be added.

pca

a logical. See get_data_ready().

mx_bio

maximum bio-tracer number. '

...

further arguments for "ml".

nbio

number of bio-tracers to be used.

Details

If the total number of combinations is smaller than mxcb then the total number of combinations is used.

Functions

Examples

1
2
3
4
5
6
## Not run: 
simu_nbio("lda")
simu_ndistr("lda")
simu_nsample()

## End(Not run)

McCannLab/spatial_fingerprints documentation built on March 13, 2021, 12:02 a.m.