Learn R Programming

OpenRepGrid (version 0.1.15)

indexSelfConstruction: Self construction profile

Description

TBD

Usage

indexSelfConstruction(
  x,
  self,
  ideal,
  others = c(-self, -ideal),
  method = "euclidean",
  p = 2,
  normalize = TRUE,
  round = FALSE
)

Value

List object of class indexSelfConstruction, containing the results from the calculations:

  • grid: Reduced grid with self, ideal and others

  • method_type: method type (correlation or distance)

  • method: correlation or distance method used

  • self_element: name of the self element

  • ideal_element: name of the ideal element

  • other_elements: name(s) of other elements

  • self_ideal: measure between self and ideal

  • self_others: measure between self and others

  • ideal_others: measure betwen ideal and others

Arguments

x

A repgrid object.

self

Numeric. Index of self element.

ideal

Numeric. Index of ideal element.

others

Numeric. Index(es) of self related "other" elements (e.g. father, friend).

method

The distance or correlation measure:

  • Distances: euclidean, manhattan, maximum, canberra, binary, minkowski

  • Correlations: pearson, kendall, spearman

p

The power of the Minkowski distance, in case minkowski is used as argument for method, otherwise it is ignored.

normalize

Normalize values?

round

Round average rating scores for 'others' to closest integer?

References

TBD

Examples

Run this code
# using distance measures
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "euclidean")
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "manhattan")
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "minkowski", p = 3)

# using correlation measures
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "pearson")
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "spearman")

# using not-normalized distances
indexSelfConstruction(boeker, 1, 2, c(3:11), method = "euclidean", normalize = FALSE)

# printing the results (biplot only works with)
cp <- indexSelfConstruction(boeker, 1, 2, c(3:11))
cp$grid  # grid with self, ideal and others
biplot2d(cp$grid, center = 4)  # midopoint centering

Run the code above in your browser using DataLab