lspoints: Lowering Stress by excluding points (lspoints)

Description Usage Arguments Details Value See Also Examples

View source: R/Modelling.R

Description

lspoints calculates Stress values for all combinations with n - 1 categories.

Usage

1
2
lspoints(data, method = "as", single = TRUE, comments = FALSE,
  type = "ordinal", weight = TRUE)

Arguments

data

Dataset; the first column must be the ID of the unit of comparison, the other columns must be categories; see dataset requirements simi.

method

Specifies the similarity index used to compute the similarity matrix, choose between "as" (Association Strength Index), "jaccard" (Jaccard Index), "cosine" (Cosine Index), and "inclusion" (Inclusion Index). Default is as.

single

If TRUE, single mentionings (i.e. one respondent mentioning just one category) are included when calculating the similarity matrix.

comments

If TRUE, comments relating to exclusion or possible exclusion of categories and respondents are displayed. Default is FALSE.

type

Specifies the type of MDS model used (for more details see the package 'smacof' by Mair, De Leeuw, Borg, & Groenen). Default is ordinal.

weight

If TRUE, the MDS model is calcualted using weights, i.e., similarities of zero are excluded. Default is TRUE.

Details

This function is applicable to co-occurrence data. It shows the resulting Stress values when single categories are excluded. The output consists in a table showing which categories have been excluded and the resulting Stress values. The table is sorted such that the the lowest Stress level occurs at the top. The MDS model is computed using the package 'smacof' (Mair, De Leeuw, Borg, & Groenen). The first column of the input matrix data should contain the ID of the unit of comparison, and the following columns the categories for which the similarity matrices and MDS maps are calculated (see also the description of simi). Note that the purpose of this function is to assist modeling by helping to identify potential problems. It is not, however, meant to be used for excluding categories based solely on measures of fit and without substantial justification.

Value

Matrix showing the categories excluded and the Stress values of the respective MDS models.

See Also

smacofSym for details on calculating MDS representations, simi for details on calculating similarity matrices.

Examples

1
2
3
4
5
## Calculate Stress values for all combinations with n - 1 (i.e., 16) SDGs
data(SDG_coocurrence)
SDG_coocurrence <- SDG_coocurrence[,-2] # Drop second column
stress <- lspoints(SDG_coocurrence)
stress

thectar documentation built on Nov. 16, 2019, 1:07 a.m.