tunelocal {CA3variants}R Documentation

Dimension selection for three-dimensional correspondence biplot using convex hull.

Description

This function allows to select the optimal dimension number for correspondence biplot, given the set of possible dimension combination of the original data. For exploring, it is also possible to check the optimal model dimension by using boostrap samples which have the same marginal proportions and the total number of the original table. When the input parameter boots = T, it does bootstrap sampling. There are three kinds of possible bootstrap sampling. When boottype = "bootnp" it performs a non parametric bootstrap sampling. When boottype = "bootpsimple" it performs a parametric simple bootstrap sampling. When boottype = "bootpstrat", it performs a parametric stratified bootstrap sampling. In particular in case of parametric bootstrap types, when resamptype=1 it considers a multinomial distribution, and when resamptype = 2 it considers a poisson distribution.

Usage

tunelocal(Xdata, ca3type = "CA3", resp = "row", norder = 3, digits = 3, boots = FALSE, 
          nboots = 0, boottype= "bootpsimple", resamptype = 1) 

Arguments

Xdata

The three-way data. It can be a R object array or raw data (n individuals by three categorical variables, for an example, see museum data). When a three-way non-symmetrical variant is performed, by default, the response variable is the row variable when an array is given, or the first of three columns when a raw data set is given. For changing, consider the parameter resp = "col" or resp = "tube".

ca3type

The specification of the analysis to be performed. If ca3type = "CA3", then a three-way (symmetrical) correspondence analysis will be performed (default analysis). If ca3type = "NSCA3", then three-way non-symmetrical correspondence analysis will be performed. If ca3type = "OCA3", then ordered three-way symmetrical correspondence analysis will be performed. If ca3type = "ONSCA3", then ordered three-way non-symmetrical correspondence analysis will be performed.

resp

The input parameter for specifying in non-symmetrical three-way correspondence analysis variants (ca3type = "NSCA3" and ca3type = "ONSCA3") what is the response variable (logically antecendent to the others). By default resp = "row", but it could be the column variable resp = "col" or the tube variable resp = "tube".

norder

The input parameter for specifying the number of ordered variable when ca3type = "OCA3" or ca3type = "ONSCA3".

digits

The input parameter specifying the digital number. By default, digits = 3.

boots

The flag parameter to perform the search of optimal dimensions using bootstrap samples. By defaults, boots = FALSE.

nboots

The number of bootstrap samples to generate when boots = TRUE. By default nboots = 0.

boottype

The specification of the kind of bootstrap sampling to be performed. If boottype = "bootpsimple", then a parametric bootstrap using a simple sampling scheme will be performed (default sampling). If boottype = "bootpstrat", then a parametric bootstrap using a stratified sampling scheme will be performed. If boottype = "bootnp", then a non-parametric bootstrap using a simple sampling scheme will be performed.

resamptype

When the kind of bootstrap is parametric you can set the data distribution using the input parameter resamptype according to two distribution: resamptype=1 corresponds to multinomial distribution and resamptype=2 to Poisson distribution.

Value

XG

The list of tables on which is performed the three-way CA variant. It consists of the original array and (when boots=T) bootstrapped arrays.

output1

Chi-square criterion and df of models on the convex hull when using the original array.

output2

Chi-square criterion and df of models on the convex hull when using bootstrapped arrays.

output3

Badness of fit criterion and df of models on the convex hull when using the original array.

output4

Badness of fit criterion and df of models on the convex hull when using bootstrapped arrays.

output5

Goodness of fit criterion and df of models on the convex hull when using the original array.

output6

Goodness of fit criterion and df of models on the convex hull when using bootstrapped arrays.

Author(s)

Rosaria Lombardo, Michel van de Velden, Eric J Beh.

References

Beh EJ and Lombardo R (2014). Correspondence Analysis, Theory, Practice and New Strategies. John Wiley & Sons.\ Wilderjans T F, Ceulemans E, and Meers K (2013). CHull: A generic convex hull based model selection method. Behavior Research Methods, 45, 1-15.\ Ceulemans E, and Kiers H A L (2006). Selecting among three-mode principal component models of different types and complexities: A numerical convex hull based method. British Journal of Mathematical & Statistical Psychology, 59, 133-150.

Examples

data(happy)
tunelocal(Xdata = happy, ca3type = "CA3", boots = FALSE)




[Package CA3variants version 3.0 Index]