Package 'T2Qv'

Title: Control Qualitative Variables
Description: Covers k-table control analysis using multivariate control charts for qualitative variables using fundamentals of multiple correspondence analysis and multiple factor analysis. The graphs can be shown in a flat or interactive way, in the same way all the outputs can be shown in an interactive shiny panel.
Authors: Wilson Rojas-Preciado [aut, cre], Mauricio Rojas-Campuzano [aut, ctb], Purificación Galindo-Villardón [aut, ctb], Omar Ruiz-Barzola [aut, ctb]
Maintainer: Wilson Rojas-Preciado <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2025-03-01 03:21:14 UTC
Source: https://github.com/cran/T2Qv

Help Index


ACM Concatenated

Description

Multiple correspondence analysis applied to a concatenated table.

Usage

ACMconcatenated(base, IndK, interactive = FALSE)

Arguments

base

Data set

IndK

Character with the name of the column that specifies the partition of the data set in k tables.

interactive

If it is TRUE, the graph will be shown interactively. If FALSE, the graph is displayed flat. FALSE is the default.

Value

A Multiple Correspondence Analysis graph of the concatenated table.

Examples

data(Datak10Contaminated)
ACMconcatenated(Datak10Contaminated,"GroupLetter", interactive = FALSE)

ACM in one point

Description

Multiple correspondence analysis applied to a specific table.

Usage

ACMpoint(base, IndK, PointTable, interactive = FALSE)

Arguments

base

Data set

IndK

Character with the name of the column that specifies the partition of the data set in k tables.

PointTable

Table indicator. A character or number that is part of the IndK registers. This argument specifies the table to which the analysis will be performed.

interactive

If it is TRUE, the graph will be shown interactively. If FALSE, the graph is displayed flat. FALSE is the default.

Value

A Multiple Correspondence Analysis graph of the table specified in PointTable.

Examples

data(Datak10Contaminated)
ACMpoint(Datak10Contaminated,"GroupLetter", PointTable="j", interactive=FALSE)

Chi squared variable from point table.

Description

Contains Chi square distance between the column masses of the table specified in PointTable and the concatenated table. It allows to identify which mode is responsible for the anomaly in the table in which it is located.

Usage

ChiSq_variable(base, IndK, PointTable, interactive = FALSE, ylim = 0.09)

Arguments

base

Data set

IndK

Character with the name of the column that specifies the partition of the data set in k tables.

PointTable

Table indicator. A character or number that is part of the IndK registers. This argument specifies the table to which the analysis will be performed.

interactive

If it is TRUE, the graph will be shown interactively. If FALSE, the graph is displayed flat. FALSE is the default.

ylim

y-axis limit.

Value

A table with Chi square distances between the column masses of the table specified in PointTable and the concatenated table.

Examples

data(Datak10Contaminated)
ChiSq_variable(Datak10Contaminated, "GroupLetter", PointTable="j", ylim=5)

10 Tables Data Set

Description

Data from 10 tables with 10 categorical variables, the data from table 10 was generated with a different distribution from the others.

Usage

Datak10Contaminated

Format

A data frame:

V01

Contains 3 modes "High", "Medium", "Low".

V02

Contains 3 modes "High", "Medium", "Low".

V03

Contains 3 modes "High", "Medium", "Low".

V04

Contains 3 modes "High", "Medium", "Low".

V05

Contains 3 modes "High", "Medium", "Low".

V06

Contains 3 modes "High", "Medium", "Low".

V07

Contains 3 modes "High", "Medium", "Low".

V08

Contains 3 modes "High", "Medium", "Low".

V09

Contains 3 modes "High", "Medium", "Low".

V10

Contains 3 modes "High", "Medium", "Low".

GroupLetter

Letters from "a" to "j" identify the k tables.


Full Panel T2 Qualitative

Description

A shiny panel complete with the multivariate control chart for qualitative variables, the two ACM charts and the modality distance table. Within the dashboard, arguments such as type I error and dimensionality can be modified.

Usage

Full_Panel(base, IndK)

Arguments

base

Data set

IndK

Character with the name of the column that specifies the partition of the data set in k tables.

Value

A complete panel with the multivariate control chart for qualitative variables, the two ACM charts and the modality distance table.

Examples

## Not run: 
data(Datak10Contaminated)
Full_Panel(Datak10Contaminated, "GroupLetter")

## End(Not run)

Multivariate control chart for qualitative variables

Description

Multivariate control chart T2 Hotelling applicable for qualitative variables.

Usage

T2_qualitative(base, IndK, dim, interactive = FALSE, alpha = 0.0027)

Arguments

base

Data set

IndK

Character with the name of the column that specifies the partition of the data set in k tables.

dim

Dimension taken for reduction. Initial dimension - 1 is recommended.

interactive

If it is TRUE, the graph will be shown interactively. If FALSE, the graph is displayed flat. FALSE is the default.

alpha

Type I error, it is recommended to reach this value by using the ARL.

Value

A control chart made with the T2 hotelling statistic, applied to detect anomalies in any of the K tables obtained with the specification of IndK. The control limit of the graph is obtained from the number of dimensions dim and the type I error alpha.

Examples

data(Datak10Contaminated)
T2_qualitative(Datak10Contaminated,"GroupLetter",9, FALSE,0.0027)