n_pairs_opt: Help Function.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Help Function to choose the proper number of pairs for the crossvariogram.

Usage

1
n_pairs_opt(coord, values, n_min = 12, n_max = 20)

Arguments

coord

Dataframe containing the coordinates from Factorial Techniques.

values

Dataframe containing values from data.

n_min

minimal number of pairs to be checked

n_max

maximal number of pairs to be checked

Details

Plotting

Value

Object containing all (max - min) values of pairs and the suggested one.

Note

This function just helps, n values can be freely choosen.

Author(s)

Victor Vicente Palacios

See Also

crossvariogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data("iris")
Versicolor <- iris[which(iris$Species=='versicolor'),-5]
##Data Standarization
means_vers <- apply(Versicolor,2,mean)
sd_vers <- apply(Versicolor,2,sd)
Versicolor_st <- Versicolor

for (i in 1:length(Versicolor[1,]))
{Versicolor_st[,i] <- (Versicolor[,i]-means_vers[i])/sd_vers[i]}

##PrComp
PC_train <- princomp(Versicolor_st)
## CrossVariogram Calculation
n_pairs <- n_pairs_opt(as.data.frame(PC_train$scores[,1:2]),as.data.frame(Versicolor_st),6,15)
plot(n_pairs$dif_pairs)

victorvicpal/MGSR documentation built on May 3, 2019, 6:11 p.m.