interpret.mdsdd: Scores of the 'mdsdd' function vs. marginal probability...

View source: R/interpret.mdsdd.R

interpret.mdsddR Documentation

Scores of the mdsdd function vs. marginal probability distributions or association measures

Description

Applies to an object of class "mdsdd", plots the scores vs. the marginal probability distributions or pairwise association measures of the discrete variables, and computes the correlations between these scores and probabilities or association measures (see Details).

Usage

## S3 method for class 'mdsdd'
interpret(x, nscore = 1, mma = c("marg1", "marg2", "assoc"), ...)

Arguments

x

object of class "mdsdd" (returned by the mdsdd function).

nscore

numeric. Selects the column of the data frame x$scores consisting of a score vector.

Note that since dad-4, nscore can only be a single value (in earlier versions, it could be a vector of length > 1).

Warning: nscore cannot be greater than the nb.factors argument in the call of the mdsdd function.

mma

character. Indicates which measures will be considered:

  • "marg1": the probability distribution of each variable.

  • "marg2": the joint probability distribution of each pair of variables.

  • "assoc": the pairwise association measures of the variables.

...

Arguments to be passed to methods.

Details

A graphics device can contain up to 9 graphs. If there are too many (more than 36) graphs for each score, one can display the graphs in a multipage PDF file.

The number of principal scores to be interpreted cannot be greater than nb.factors of the data frame x$scores returned by the function mdsdd.

Value

Returns a list including:

pearson

matrix of Pearson correlations between selected scores and probabilities or association measures.

spearman

matrix of Spearman correlations between selected scores and probabilities or association measures.

Author(s)

Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Sabine Demotes-Mainard

See Also

mdsdd; plot.mdsdd.

Examples

# INSEE (France): Diploma x Socio professional group, seven years.
data(dspg)
xlista = dspg
a <- mdsdd(xlista)
interpret(a)

# Example 3 with a list of 96 arrays (departments)
## Not run: 
data(dspgd2015)
xd = dspgd2015
res = mdsdd(xd, group.name = "coded")
interpret(res)
plot(res, fontsize.points = 0.7)

# Each department is represented by its name
data(departments)
coor = merge(res$scores, departments, by = "coded")
dev.new()
plot(coor$PC.1, coor$PC.2, type ="n")
text(coor$PC.1, coor$PC.2, coor$named, cex = 0.5)

# Each department is represented by its region
dev.new()
plot(coor$PC.1, coor$PC.2, type ="n")
text(coor$PC.1, coor$PC.2, coor$coder, cex = 0.7)

## End(Not run)

dad documentation built on Aug. 30, 2023, 5:06 p.m.