mfm_sampleSize: Choice of the optimal sample size for the MFM algorithm

Description Usage Arguments Examples

View source: R/mfm_sampleSize.R

Description

Choice of the optimal sample size for the MFM algorithm

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mfm_sampleSize(
  data,
  rangeSizeSample,
  alpha = 0.9,
  listfns = NULL,
  listinputs = NULL,
  coordX = NULL,
  coordY = NULL,
  minDistance = 0,
  nDraws = 2000,
  nReplications = 1000,
  methodNormalization = "ecdf",
  weightsfns = NULL,
  progressBar = TRUE
)

Arguments

data

the dataframe to use

rangeSizeSample

the list of the sample sizes to tested

alpha

the percentage of reduction of the criterion

listfns

list of functionals to be used. If NULL (the default) then the mean, the standard deviation and Kendall's tau between each variables are used.

listinputs

list of inputs to the functionals. Only used when listfns is not NULL.

coordX

X coordinates of the points. Used for spatial data.

coordY

Y coordinates of the points. Used for spatial data.

minDistance

minimum distance between two observations of the selected sample

nDraws

number of draws to compute each MFM criterion.

nReplications

number of replications of the MFM criterion computation.

methodNormalization

the method used for normalization. Can be ecdf for normalization by the empirical cumulative distribution function or meansd for the normalization (X-E[X])/sd(X).

weightsfns

weights for each of the functionals. These weights can be used to give more or less importance to some of the functionals. It should be a vector of the same length as the listfns.

progressBar

TRUE: display a progressbar

Examples

1
2
3
4
5
6
variables = c("mass", "moist", "elev")
df = agridat::gartner.corn
result = mfm_sampleSize(
  data = df[,variables], rangeSizeSample = c(15,25,30),
  nDraws = 500, nReplications = 20,
  coordX = df$long, coordY = df$lat)

AlexisDerumigny/MFunctMatching documentation built on Dec. 31, 2020, 9:47 a.m.