optIscalInterval: Selecting the optimal multidimensional scaling procedure for...

View source: R/optIscalInterval.r

optIscalIntervalR Documentation

Selecting the optimal multidimensional scaling procedure for interval-valued data

Description

Selecting the optimal multidimensional scaling procedure by varying all combinations of normalization and optimization methods

Usage

optIscalInterval(x,dataType="simple",normalizations=NULL,
optMethods=NULL,outputCsv="",outputCsv2="",y=NULL,outDec=",",
stressDigits=6,HHIDigits=2,...)

Arguments

x

interval-valued data table or matrix or dataset

dataType

Type of symbolic data table passed to function:

'sda' - full symbolicDA format object;

'simple' - three dimensional array with lower and upper bound of intervals in third dimension;

'separate_tables' - lower bound of intervals in x, upper bound of intervals in y (formula y=... needed in argument list);

'rows' - lower and upper bound of intervals in neighbouring rows;

'columns' - lower and upper bound of intervals in neighbouring columns

normalizations

optional, vector of normalization methods that should be used in procedure

optMethods

optional, vector of optimization methods

outputCsv

optional, name of csv file with results

outputCsv2

optional, name of csv (comma as decimal point sign) file with results

y

matrix or dataset with upper bounds of intervals if argument dataType is equal to "separate_tables"

outDec

decimal sign used in returned table

stressDigits

Number of decimal digits for displaying I-Stress value

HHIDigits

Number of decimal digits for displaying HHI spb value

...

arguments passed to smds I-scal implementation (function .IMDS), like p, maxit, eps and others

Details

Parameter normalizations may be the subset of the following values:

"n1","n2","n3","n3a","n4","n5","n5a","n6","n6a",

"n7","n8","n9","n9a","n10","n11","n12","n12a","n13"

(e.g. normalizations=c("n1","n2","n3","n5","n5a",

"n8","n9","n9a","n11","n12a"))

if normalizations is set to "n0" no normalization is applied

Parameter optMethods may be the subset of the following values (.IMDS):

("MM","BFGS")

Function .IMDS is a clone of IMDS function from former smds package

Value

Data frame ordered by increasing value of Stress-1 fit measure with columns:

Normalization method

normalization method used for p-th multidimensional scaling procedure

Opt method

Optimization method used .IMDS I-Scal implememtatiomn

Spline degree

Additional spline.degree value if mspline model is used for simulation, for other models there is no value in this cell

I-STRESS

value of I-Stress fit measure for p-th multidimensional scaling procedure

HHI spb

Hirschman-Herfindahl HHI index calculated based on stress per boc for p-th multidimensional scaling procedure

Author(s)

Marek Walesiak marek.walesiak@ue.wroc.pl

Department of Econometrics and Computer Science, Wroclaw University of Economics and Business, Poland

Andrzej Dudek andrzej.dudek@ue.wroc.pl

Department of Financial Investments and Risk Management, Wroclaw University of Economics and Business, Poland

References

Borg, I., Groenen, P.J.F. (2005), Modern Multidimensional Scaling. Theory and Applications, 2nd Edition, Springer Science+Business Media, New York. ISBN: 978-0387-25150-9. Available at: https://link.springer.com/book/10.1007/0-387-28981-X.

Borg, I., Groenen, P.J.F., Mair, P. (2013), Applied Multidimensional Scaling, Springer, Heidelberg, New York, Dordrecht, London. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-642-31848-1")}.

Groenen, P.J.F. Winsberg, S., Rodriguez, O., Diday, E. (2006), I-Scal: Multidimensional scaling of interval dissimilarities, Computational Statistics & Data Analysis, 51(1), 360–378. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2006.04.003")}.

Herfindahl, O.C. (1950), Concentration in the Steel Industry, Doctoral thesis, Columbia University.

Hirschman, A.O. (1964), The Paternity of an Index, The American Economic Review, Vol. 54, 761-762.

Walesiak, M. (2014), Przegląd formuł normalizacji wartości zmiennych oraz ich własności w statystycznej analizie wielowymiarowej [Data Normalization in Multivariate Data Analysis. An Overview and Properties], Przegląd Statystyczny, tom 61, z. 4, 363-372

Walesiak, M. (2016), Visualization of Linear Ordering Results for Metric Data with the Application of Multidimensional Scaling, Ekonometria, 2(52), 9-21. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.15611/ekt.2016.2.01")}.

Walesiak, M., Dudek, A. (2017), Selecting the Optimal Multidimensional Scaling Procedure for Metric Data with R Environment, STATISTICS IN TRANSITION new series, September, Vol. 18, No. 3, pp. 521-540. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.59170/stattrans-2017-027")}.

Walesiak, M., Dehnel, G. (2020), The Measurement of Social Cohesion at Province Level in Poland Using Metric and Interval-Valued Data, Sustainability, 12(18), 7664, 1-19. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/su12187664")}.

Walesiak, M., Dehnel, G., Dudek, A. (2025), Visualisation of linear ordering results using multidimensional scaling – problems and an overview of studies, Argumenta Oeconomica, No 1 (54), 187-203. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.15611/aoe.2025.1.12")}.

Walesiak, M., Dehnel, G. (2026), Assessment of the implementation of SDG 4 goal by EU countries in the light of the 2030 Agenda using a hybrid approach in linear ordering, PLoS ONE 21(6): e0333545. Available at: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pone.0333545")}.

See Also

data.Normalization, interval_normalization

Examples

  
  library(mdsOpt)
  library(ggplot2)
  library(ggrepel)
  data(data_symbolic_interval_polish_voivodships)
  x<-data_symbolic_interval_polish_voivodships
  metnor<-c("n1","n2","n3","n5","n5a","n8","n9","n9a","n11","n12a")
  methods<-c("MM","BFGS")
  res<-optIscalInterval(x,dataType="simple",normalizations=metnor,optMethods=methods,outDec=".")
  Istress<-as.numeric(gsub(",",".",res[,"I-STRESS"],fixed=TRUE))
  hhi<-as.numeric(gsub(",",".",res[,"HHI spb"],fixed=TRUE))
  t<-findOptimalIscalInterval(res)
  cs<-(min(Istress)+max(Istress))/2 # critical I-stress
  print(t)
  # write.table(res,file="smds_HHI.csv",sep=";",dec=",",row.names=TRUE,col.names=NA)
  # plot 'old way'
  plot(Istress[-t$Nr],hhi[-t$Nr], xlab="I-Stress", ylab="HHI",type="n",font.lab=3)
  text(Istress[-t$Nr],hhi[-t$Nr],labels=(1:nrow(res))[-t$Nr])
  abline(v=cs,col="red")
  points(Istress[t$Nr],hhi[t$Nr], cex=5,col="red")
  text(Istress[t$Nr],hhi[t$Nr],labels=(1:nrow(res))[t$Nr],col="red")
  #or plot ggplot2 
  plot_data <- data.frame(
   object = seq_len(nrow(res)),
   stress = Istress,
   hhi = hhi,
   optimal = seq_len(nrow(res)) == t$Nr
  )
  plot_data <- plot_data[
   is.finite(plot_data$stress) &
     is.finite(plot_data$hhi),
  ]
  p <- ggplot(
   plot_data,
   aes(
     x = stress,
     y = hhi
   )
  ) +

  # critical stress line
  geom_vline(
   xintercept = cs,
   colour = "red",
   linewidth = 0.7
  ) +

  # ordinary points
  geom_point(
   data = subset(
     plot_data,
     !optimal
   ),
   shape = 16,
   size = 2.2
  ) +

  # labels for ordinary points
  geom_text_repel(
   data = subset(
     plot_data,
     !optimal
   ),
   aes(
     label = object
   ),
   size = 3.5,
   box.padding = 0.45,
   point.padding = 0.30,
   force = 2,
   max.overlaps = Inf,
   min.segment.length = 0,
   seed = 123
  ) +

  # optimal solution highlighted by a large red circle
  geom_point(
   data = subset(
     plot_data,
     optimal
   ),
   shape = 16,
   size = 3,
   stroke = 1.2,
   colour = "red"
  ) +

  # label for optimal solution
  geom_text_repel(
   data = subset(
     plot_data,
     optimal
   ),
   aes(
     label = object
   ),
   colour = "red",
   fontface = "bold",
   size = 4,
   box.padding = 0.7,
   point.padding = 0.8,
   force = 3,
   max.overlaps = Inf,
   min.segment.length = 0,
   seed = 123
  ) +

  labs(
   x = "I Stress",
   y = "HHI spb"
  ) +

  theme_classic(
   base_size = 12
  ) +

  theme(
   axis.title = element_text(
     face = "italic"
   )
  )
  print(p)
    

mdsOpt documentation built on Oct. 2, 2026, 5:09 p.m.