manual_MDS.cpp 99 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971
  1. /* manual_MDS.cpp
  2. *
  3. * Copyright (C) 1993-2014, 2015 David Weenink
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /*
  19. djmw 20020422 GPL + removed "C syntax" part of manpage
  20. djmw 20030317 Latest modification.
  21. djmw 20030825 Spelling corrections.
  22. djmw 20040118 Procrustes modifications.
  23. djmw 20040214 Removed last link to @praat program@.
  24. djmw 20040407 Change Arguments -> Settings.
  25. djmw 20040513 Spelling.
  26. djmw 20070108 Latest modification.
  27. */
  28. #include "ManPagesM.h"
  29. #include "MDS.h"
  30. static void drawLetterRConfigurationExample (Graphics g)
  31. {
  32. autoConfiguration me = Configuration_createLetterRExample (1);
  33. Graphics_setWindow (g, -6, 4, -7, 5);
  34. Configuration_draw (me.get(), g, 1, 2, -6, 4, -7, 5, 0, 1, U"", 1);
  35. }
  36. static void drawLetterRConfigurationExample2 (Graphics g)
  37. {
  38. autoConfiguration me = Configuration_createLetterRExample (2);
  39. Configuration_draw (me.get(), g, 1, 2, -0.8, 1.2, -0.8, 0.7, 0, 1, U"", 1);
  40. }
  41. static void drawLetterRShepard (Graphics g)
  42. {
  43. autoDissimilarity d = Dissimilarity_createLetterRExample (32.5);
  44. autoConfiguration c = Configuration_createLetterRExample (2);
  45. Dissimilarity_Configuration_drawShepardDiagram (d.get(), c.get(), g, 0, 200, 0, 2.2, 1, U"+", 1);
  46. }
  47. static void drawLetterRRegression (Graphics g)
  48. {
  49. autoDissimilarity d = Dissimilarity_createLetterRExample (32.5);
  50. autoConfiguration c = Configuration_createLetterRExample (2);
  51. Dissimilarity_Configuration_drawMonotoneRegression (d.get(), c.get(), g, MDS_PRIMARY_APPROACH, 0, 200, 0, 2.2, 1, U"+", 1);
  52. }
  53. static void drawCarrollWishConfigurationExample (Graphics g)
  54. {
  55. autoConfiguration me = Configuration_createCarrollWishExample ();
  56. Graphics_setWindow (g, -2, 2, -2, 2);
  57. Configuration_draw (me.get(), g, 1, 2, -2, 2, -2, 2, 0, 1, U"", 1);
  58. }
  59. static void drawCarrollWishSalienceExample (Graphics g)
  60. {
  61. autoSalience me = Salience_createCarrollWishExample ();
  62. Salience_draw (me.get(), g, 1, 2, 1);
  63. }
  64. static void drawMsplineExample (Graphics g)
  65. {
  66. drawSplines (g, 0, 1, 0, 10, 1, 3, U"0.3 0.5 0.6", 1);
  67. }
  68. static void drawIsplineExample (Graphics g)
  69. {
  70. drawSplines (g, 0, 1, 0, 1.5, 2, 3, U"0.3 0.5 0.6", 1);
  71. }
  72. void manual_MDS_init (ManPages me);
  73. void manual_MDS_init (ManPages me)
  74. {
  75. MAN_BEGIN (U"CANDECOMP", U"djmw", 19971201)
  76. ENTRY (U"An algorithm to solve the INDSCAL problem.")
  77. NORMAL (U"In the analysis of the INDSCAL three-way data matrix (%numberOfPoints "
  78. "\\xx %numberOfDimensions \\xx %numberOfSources) we seek to minimize the "
  79. "function: ")
  80. FORMULA (U"%f(%X, %W__1_,..., %W__%numberOfSources_) = "
  81. "\\su__%i=1..%numberOfSources_ | %S__%i_ \\-- %X%W__%i_%X\\'p |^2")
  82. NORMAL (U"where %S__%i_ is a known symmetric %numberOfPoints \\xx %numberOfPoints "
  83. "matrix with scalar products of distances for source %i, %X is the unknown configuration "
  84. "%numberOfPoints \\xx %numberOfDimensions matrix, %X\\'p its transpose, and, %W__%i_ is "
  85. "the diagonal %numberOfDimensions \\xx %numberOfDimensions weight matrix for source %i. The function "
  86. "above has no analytical solution for %X and the %W__%i_. It can be solved, however, "
  87. "by an iterative procedure which Carroll & Chang have christened CANDECOMP "
  88. "(CANonical DECOMPosition). This method minimizes, instead of the function "
  89. "given above, the following function:")
  90. LIST_ITEM (U"%g(%X, %Y, %W__1_,..., %W__%numberOfSources_) = \\su__%i=1..%numberOfSources_ "
  91. "| %S__%i_ \\-- %X%W__%i_%Y\\'p |^2")
  92. NORMAL (U"where %X and %Y are both %numberOfPoints \\xx %numberOfDimensions configuration matrices.")
  93. NORMAL (U"The algorithm proceeds as follows:")
  94. NORMAL (U"1. Initialize the $W matrices and the configuration matrix %X. This can for example be "
  95. "done according to a procedure given in @@Young, Takane & Lewyckyj (1978)@.")
  96. NORMAL (U"2. An alternating least squares minimization process is started as described that "
  97. "sequentially updates %Y, %X an %W (@@Carroll & Chang (1970)@):")
  98. LIST_ITEM (U"2.1. Solve for a new %Y given %X and the %W__%i_")
  99. LIST_ITEM (U"2.2. Solve for a new %X given the %W__%i_ and the new %Y.")
  100. LIST_ITEM (U"2.3. Solve for the %W__%i_ given the new %X and %Y.")
  101. NORMAL (U"Evaluate the goodness-of-fit criterion and either repeat the minimization sequence "
  102. "(2.1\\--2.3) or continue.")
  103. NORMAL (U"3. Done: make %Y equal to %X and solve a last time for the %W__%i_.")
  104. NORMAL (U"Note: during the minimization the following constraints are effective:")
  105. LIST_ITEM (U"The configuration should be centered.")
  106. LIST_ITEM (U"The sum of squared coordinates in the configuration space is one for "
  107. "each dimension, i.e., the configuration always has unit variance in each dimension.")
  108. MAN_END
  109. MAN_BEGIN (U"Configuration", U"djmw", 20101102)
  110. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  111. NORMAL (U"An object of type Configuration represents the positions of a number "
  112. "of labelled points in a multidimensional space.")
  113. ENTRY (U"How to create a Configuration")
  114. NORMAL (U"From the New menu:")
  115. LIST_ITEM (U" \\bu @@Create Configuration...")
  116. NORMAL (U"By multidimensional scaling:")
  117. LIST_ITEM (U" \\bu @@Dissimilarity: To Configuration (monotone mds)...")
  118. LIST_ITEM (U" \\bu @@Dissimilarity: To Configuration (i-spline mds)...")
  119. LIST_ITEM (U" \\bu @@Dissimilarity: To Configuration (interval mds)...")
  120. LIST_ITEM (U" \\bu @@Dissimilarity: To Configuration (ratio mds)...")
  121. LIST_ITEM (U" \\bu @@Dissimilarity: To Configuration (absolute mds)...")
  122. NORMAL (U"By multidimensional scaling with weights (@@Dissimilarity & Weight: To Configuration...@):")
  123. LIST_ITEM (U" \\bu ##Dissimilarity & Weight: To Configuration (monotone mds)...")
  124. LIST_ITEM (U" \\bu ##Dissimilarity & Weight: To Configuration (i-spline mds)...")
  125. LIST_ITEM (U" \\bu ##Dissimilarity & Weight: To Configuration (interval mds)...")
  126. LIST_ITEM (U" \\bu ##Dissimilarity & Weight: To Configuration (ratio mds)...")
  127. LIST_ITEM (U" \\bu ##Dissimilarity & Weight: To Configuration (absolute mds)...")
  128. NORMAL (U"By multidimensional scaling with a start Configuration:")
  129. LIST_ITEM (U" \\bu @@Dissimilarity & Configuration: To Configuration (monotone mds)...")
  130. LIST_ITEM (U" \\bu @@Dissimilarity & Configuration: To Configuration (i-spline mds)...")
  131. LIST_ITEM (U" \\bu @@Dissimilarity & Configuration: To Configuration (interval mds)...")
  132. LIST_ITEM (U" \\bu @@Dissimilarity & Configuration: To Configuration (ratio mds)...")
  133. LIST_ITEM (U" \\bu @@Dissimilarity & Configuration: To Configuration (absolute mds)...")
  134. NORMAL (U"By transforming an existing Configuration:")
  135. LIST_ITEM (U" \\bu @@Configuration: To Configuration (varimax)...")
  136. LIST_ITEM (U" \\bu @@Configuration & AffineTransform: To Configuration")
  137. LIST_ITEM (U" \\bu @@Configuration & Procrustes: To Configuration")
  138. NORMAL (U"From @@Principal component analysis@:")
  139. LIST_ITEM (U" \\bu @@TableOfReal: To Configuration (pca)...")
  140. LIST_ITEM (U" \\bu @@PCA & TableOfReal: To Configuration...")
  141. NORMAL (U"From @@Discriminant analysis@:")
  142. LIST_ITEM (U"@@TableOfReal: To Configuration (lda)...")
  143. LIST_ITEM (U" \\bu @@Discriminant & TableOfReal: To Configuration...")
  144. ENTRY (U"How to draw a Configuration")
  145. LIST_ITEM (U"\\bu @@Configuration: Draw...")
  146. LIST_ITEM (U"\\bu ##Configuration: Draw as numbers...")
  147. LIST_ITEM (U"\\bu ##Configuration: Draw as squares...")
  148. ENTRY (U"How to modify a Configuration")
  149. LIST_ITEM (U"\\bu @@Configuration: Randomize")
  150. LIST_ITEM (U"\\bu @@Configuration: Rotate (pc)@ (to principal directions)")
  151. LIST_ITEM (U"\\bu @@Configuration: Rotate...@ (in a plane around the origin)")
  152. LIST_ITEM (U"\\bu @@Configuration: Invert dimension...")
  153. LIST_ITEM (U"\\bu @@Configuration: Normalize...")
  154. ENTRY (U"Inside a Configuration")
  155. NORMAL (U"With @Inspect you will see the following attributes:")
  156. TAG (U"%numberOfRows")
  157. DEFINITION (U"the number of points (%numberOfPoints\\>_1).")
  158. TAG (U"%numberOfColumns")
  159. DEFINITION (U"the dimension of the space (%numberOfDimensions\\>_1).")
  160. TAG (U"%rowLabels")
  161. DEFINITION (U"the names associated with the points.")
  162. TAG (U"%columnLabels")
  163. DEFINITION (U"the names for the dimensions.")
  164. TAG (U"%data [1..%numberOfPoints][1..%numberOfDimensions]")
  165. DEFINITION (U"the coordinates of the points.")
  166. TAG (U"%metric")
  167. DEFINITION (U"determines the way distances between points are measured. In general "
  168. "the distance between points #x__%i_ and #x__%j_ is:")
  169. FORMULA (U"%d__%ij_ = "
  170. "(\\su__%k=1..%numberOfDimensions_ %w__%k_ |%x__%ik_ \\-- "
  171. "%x__%jk_|^^%metric^)^^1/%metric^")
  172. DEFINITION (U"For Euclidean distances %metric is 2.")
  173. TAG (U"%w [1..%numberOfDimensions]")
  174. DEFINITION (U"weight given to each dimension in the distance calculation.")
  175. MAN_END
  176. MAN_BEGIN (U"Configuration: Centralize", U"djmw", 19980413)
  177. INTRO (U"Makes the centre of the selected @Configuration equal to the origin.")
  178. NORMAL (U"")
  179. MAN_END
  180. MAN_BEGIN (U"Configuration: Draw...", U"djmw", 20040407)
  181. INTRO (U"Draws a projection of the selected @Configuration on a coordinate plane.")
  182. ENTRY (U"Settings")
  183. TAG (U"##X-coordinate#, ##Y-coordinate#")
  184. DEFINITION (U"control the dimensions that will show in the plot.")
  185. TAG (U"##xmin#, ##xmax#; ##ymin#, ##ymax#")
  186. DEFINITION (U"range for horizontal and vertical axes, respectively.")
  187. TAG (U"##Garnish")
  188. DEFINITION (U"when on, draws a bounding box with decoration.")
  189. MAN_END
  190. MAN_BEGIN (U"Configuration: Invert dimension...", U"djmw", 20040407)
  191. INTRO (U"Inverts one dimension of a @Configuration.")
  192. NORMAL (U"Setting")
  193. TAG (U"##Dimension")
  194. DEFINITION (U"the dimensions that has to be inverted.")
  195. ENTRY (U"Behaviour")
  196. NORMAL (U"For all points %i=1..%numberOfPoints: if %j == %dimension then %x__%ij_ "
  197. "= \\--%x__%ij_.")
  198. MAN_END
  199. MAN_BEGIN (U"Configuration: Normalize...", U"djmw", 20040407)
  200. INTRO (U"Normalizes the selected @Configuration.")
  201. ENTRY (U"Settings")
  202. TAG (U"##Sum of squares# (standard value: 0.0)")
  203. DEFINITION (U"The desired value for the variance.")
  204. TAG (U"##Each dimension separately")
  205. DEFINITION (U"When on, the sum of squares in each dimension (column) will be scaled to %sumOfSquares "
  206. "When off, the sum of squares of all the matrix elements will equal %sumOfSquares.")
  207. NORMAL (U"With the default value (0.0) for %sumOfSquares, and %eachDimensionSeparately chosen, "
  208. "an INDSCAL-like normalization is applied: the sum of squares for each column is scaled to "
  209. "equal 1.0. When %eachDimensionSeparately is off, a Kruskal-like normalization is applied: "
  210. "the sum of squares of the whole matrix is scaled equal to %numberOfRows.")
  211. ENTRY (U"Behaviour")
  212. NORMAL (U"Before the normalization will be applied, however, we first translate the centre of the "
  213. "configuration to the origin by subtracting the mean for each dimension. "
  214. "The sum of squares than equals variance.")
  215. MAN_END
  216. MAN_BEGIN (U"Configuration: Randomize", U"djmw", 19971201)
  217. INTRO (U"Changes all coordinates of the points #%x__%i_ in the @Configuration according to:")
  218. LIST_ITEM (U"%x__%ij_ = randomUniform (-1, 1)")
  219. MAN_END
  220. MAN_BEGIN (U"Configuration: Rotate...", U"djmw", 20100303)
  221. INTRO (U"Rotates the @Configuration in a plane around the origin.")
  222. NORMAL (U"Settings")
  223. TAG (U"##Dimension 1#, ##Dimension 2#")
  224. DEFINITION (U"the dimensions that span the plane. The order of dimension 1 and dimension 2 is not important: "
  225. "the lowest number always determines the first dimension.")
  226. TAG (U"##Angle")
  227. DEFINITION (U"the counter-clockwise rotation angle in degrees.")
  228. MAN_END
  229. MAN_BEGIN (U"Configuration: Rotate (pc)", U"djmw", 19971201)
  230. INTRO (U"Rotates the @Configuration to principal directions. The principal directions "
  231. "correspond to the principal components.")
  232. MAN_END
  233. MAN_BEGIN (U"Configuration: To Configuration (procrustes)", U"djmw", 19971219)
  234. INTRO (U"A command that transforms the second selected @Configuration object "
  235. "to match the first selected Configuration object as closely as possible."
  236. "This problem of fitting one configuration (testee) to another (target) "
  237. "as closely as possible is called the Procrustes problem. We use a "
  238. "special @@Procrustes transform@ algorithm that does not "
  239. "mutilate or distort the testee configuration.")
  240. NORMAL (U"Both Configuration objects must have the same dimensions.")
  241. MAN_END
  242. MAN_BEGIN (U"Configuration: To Configuration (varimax)...", U"djmw", 20040407)
  243. INTRO (U"A command that rotates the selected @Configuration object to a new "
  244. "Configuration object whose coordinates have maximum %squared variance. ")
  245. ENTRY (U"Settings")
  246. TAG (U"##Normalize rows")
  247. DEFINITION (U"when selected, the distances of all points to the origin will "
  248. "be made equal before iteration starts. We remember these scale factors "
  249. "and restore the original distances after the iteration process has "
  250. "stopped.")
  251. TAG (U"##Quartimax")
  252. DEFINITION (U"when selected, the sum of fourth powers, normalized or raw, "
  253. "will be maximized. ")
  254. TAG (U"##Maximum number of iterations")
  255. DEFINITION (U"sets a limit to the number of iterations. One iteration consists "
  256. "of %numberOfDimensions\\.c (%numberOfDimensions\\--1)/2 planar rotations "
  257. "of all pairs of dimensions.")
  258. TAG (U"##Tolerance")
  259. DEFINITION (U"also determines when the iteration stops. This happens if "
  260. "|%v__%i_\\--%v__%i+1_| < %tolerance \\.c %v__%i_, where %v__%i_ is the "
  261. "squared variance for the %i^^th^ iteration.")
  262. NORMAL (U"The iteration process stops when either the %%maximum number of "
  263. "iterations% is reached or the %tolerance criterion is met, which ever "
  264. "one is first.")
  265. ENTRY (U"Algorithm")
  266. NORMAL (U"The Varimax rotation procedure was first proposed by @@Kaiser "
  267. "(1958)@. Given a %numberOfPoints \\xx %numberOfDimensions configuration "
  268. "#A, the procedure tries to find an orthonormal rotation matrix #T such "
  269. "that the sum of variances of the columns of #B*#B is a maximum, where #B "
  270. "= #A#T and * is the element wise (Hadamard) product of matrices. A direct "
  271. "solution for the optimal #T is not available, except for the case when "
  272. "%numberOfDimensions equals two. Kaiser suggested an iterative "
  273. "algorithm based on planar rotations, i.e., alternate rotations of all "
  274. "pairs of columns of #A.")
  275. NORMAL (U"However, this procedure is not without problems: the varimax function "
  276. "may have stationary points that are not even local maxima. We have "
  277. "incorporated an algorithm of @@Ten Berge (1995)@ "
  278. "that prevents this unpleasant situation from happening.")
  279. MAN_END
  280. MAN_BEGIN (U"Configuration: To Distance", U"djmw", 19971207)
  281. INTRO (U"A command that computes a @Distance object for each selected "
  282. "@Configuration.")
  283. ENTRY (U"Algorithm")
  284. NORMAL (U"The distance %d__%ij_ between objects %i and %j is calculated as:")
  285. FORMULA (U"%d__%ij_ = %d__%ji_ = (\\su__%k=1..%numberOfDimensions_ |%x__%ik_ "
  286. "\\-- %x__%jk_|^2)^^1/2^")
  287. MAN_END
  288. MAN_BEGIN (U"Configuration: To Similarity (cc)", U"djmw", 19980130)
  289. INTRO (U"A command that create one @Similarity object from the selected "
  290. "@Configuration objects.")
  291. NORMAL (U"In the Similarity object entry %s__%ij_ equals the @@congruence "
  292. "coefficient@ for the %i-th and %j-th selected Configuration object.")
  293. NORMAL (U"All Configuration objects must have the same number of points and "
  294. "the same dimensions.")
  295. MAN_END
  296. MAN_BEGIN (U"Configuration & AffineTransform: To Configuration", U"djmw", 20011008)
  297. INTRO (U"A command that transforms the selected @Configuration to a new "
  298. "Configuration object according to the specifications in the selected "
  299. "@AffineTransform object.")
  300. MAN_END
  301. MAN_BEGIN (U"Configuration & Procrustes: To Configuration", U"djmw", 20011008)
  302. INTRO (U"A command that transforms the selected @Configuration to a new "
  303. "Configuration object according to the specifications in the selected "
  304. "@Procrustes object.")
  305. MAN_END
  306. MAN_BEGIN (U"Configurations: To AffineTransform (congruence)...", U"djmw", 20040407)
  307. INTRO (U"A command that creates an @AffineTransform object from two selected "
  308. "@Configuration objects.")
  309. NORMAL (U"We calculate the affine transform that transforms the second "
  310. "selected Configuration object to match the first selected Configuration "
  311. "object as closely as possible. "
  312. "The degree of proportionality is the congruence between corresponding "
  313. "dimensions.")
  314. ENTRY (U"Settings")
  315. TAG (U"##Maximum number of iterations")
  316. DEFINITION (U"sets a limit to the number of iterations.")
  317. TAG (U"##Tolerance")
  318. DEFINITION (U"also determines when the iteration stops. This happens if "
  319. "|%f(#T__%i_)\\--%f(#T__%i+1_)| < %tolerance \\.c %f(#T__%i_), where "
  320. "%f(#T__%i_) is the sum of the congruences for the %i^^th^ "
  321. "iteration (see below).")
  322. NORMAL (U"The iteration process stops when either the %%maximum number of "
  323. "iterations% is reached or the %tolerance criterion is met, which ever "
  324. "one is first.")
  325. ENTRY (U"Algorithm")
  326. NORMAL (U"Sometimes the criterion used in a @@Procrustes transform@ is too "
  327. "restrictive for comparing two configurations. This criterion is only "
  328. "zero when the positions in the rotated configuration (#A#T) equal the "
  329. "positions in the other configuration (#B). @@Brokken (1983)@ proposed an "
  330. "algorithm to maximize instead the sum of congruences between "
  331. "corresponding dimensions of #AT and #B. "
  332. "Specifically he proposed to maximize")
  333. FORMULA (U"%f(#T) = \\su__%i=1..%numberOfDimensions_ #t\\'p__%i_#A\\'p#b__%i_ /"
  334. " ((#t\\'p__%i_#A\\'p#A#t__%i_)^^1/2^(#b\\'p__%i_#b__%i_)^^1/2^),")
  335. NORMAL (U"where #t\\'p__%i_ and #b\\'p__%i_ are the %i^^th^ column of #T and "
  336. "#B, respectively. A direct solution for #T is not available, it can only "
  337. "be obtained by an iterative procedure. The implemented algorithm is from "
  338. "@@Kiers & Groenen (1996)@ and shows excellent convergence properties.")
  339. MAN_END
  340. MAN_BEGIN (U"Configuration & Configuration: To Procrustes...", U"djmw", 20011008)
  341. INTRO (U"A command that creates a @Procrustes object from two selected "
  342. "@Configuration objects.")
  343. ENTRY (U"Setting")
  344. TAG (U"##Orthogonal transform")
  345. DEFINITION (U"determines whether or not a translation and a scaling are allowed in the transform.")
  346. NORMAL (U"We calculate the @@Procrustes transform@ that transforms the second "
  347. "selected Configuration object to match the first selected Configuration "
  348. "object as closely as possible.")
  349. MAN_END
  350. MAN_BEGIN (U"Confusion: To Dissimilarity...", U"djmw", 20040407)
  351. INTRO (U"A command that creates a @Dissimilarity from every selected "
  352. "@Confusion.")
  353. ENTRY (U"Settings")
  354. TAG (U"##Normalize")
  355. DEFINITION (U"when on, normalize rows by dividing each row element by the row "
  356. "sum. In this way you correct for unequal stimulus numbers.")
  357. TAG (U"##No symmetrization#, #Average, #Houtgast")
  358. DEFINITION (U"determine the symmetrization procedure. See "
  359. "@@Confusion: To Similarity...")
  360. TAG (U"##Maximum dissimilarity")
  361. DEFINITION (U"determines the maximum dissimilarity possible. When the default "
  362. "value, 0.0, is chosen, %maximumDissimilarity "
  363. "is calculated as the maximum element in the Similarity object.")
  364. ENTRY (U"Algorithm")
  365. NORMAL (U"We first transform the Confusion to a Similarity. See "
  366. "@@Confusion: To Similarity...")
  367. NORMAL (U"To obtain dissimilarities from similarities we \"reverse\" the "
  368. "latter:")
  369. FORMULA (U"%%dissimilarity__%ij_ = %maximumDissimilarity \\-- %similarity__%ij_")
  370. MAN_END
  371. MAN_BEGIN (U"Confusion: To Dissimilarity (pdf)...", U"djmw", 20040407)
  372. INTRO (U"A command that creates a @Dissimilarity from every selected "
  373. "@Confusion.")
  374. ENTRY (U"Settings")
  375. TAG (U"##Symmetrize first")
  376. DEFINITION (U"when on, the confusion matrix is symmetrized before we calculate "
  377. "dissimilarities.")
  378. TAG (U"##Maximum dissimilarity (units of sigma)")
  379. DEFINITION (U"specifies the dissimilarity from confusion matrix elements that "
  380. "are zero.")
  381. ENTRY (U"Algorithm")
  382. TAG (U"1. Normalize rows by dividing each row element by the row sum (optional).")
  383. TAG (U"2. Symmetrize the matrix by averaging %f__%ij_ and %f__%ji_.")
  384. TAG (U"3. Transformation of the confusion measure which is a sort of "
  385. "%similarity measure to the %dissimilarity measure.")
  386. NORMAL (U"Similarity and dissimilarity have an inverse relationship: the "
  387. "greater the similarity, the smaller the dissimilarity and vice versa. "
  388. "Both have a monotonic relationship with distance. "
  389. "The most simple way to transform the similarities %f__%ij_ into "
  390. "dissimilarities is:")
  391. FORMULA (U"%dissimilarity__%ij_ = %maximumSimilarity \\-- %similarity__%ij_")
  392. NORMAL (U"For ordinal analyses like Kruskal this transformation is fine because "
  393. "only order relations are important in this analysis. However, for "
  394. "metrical analyses like INDSCAL this is not optimal. "
  395. "In INDSCAL, distance is a linear function of dissimilarity. This means "
  396. "that, with the transformation "
  397. "above, you ultimately fit an INDSCAL model in which the distance "
  398. "between object %i and %j will be linearly related to the confusion "
  399. "between %i and %j.")
  400. NORMAL (U"For the relation between confusion and dissimilarity, the model "
  401. "implemented here, makes the assumption that the amount of confusion "
  402. "between objects %i and %j is related to the amount that their "
  403. "probability density functions, pdf's, overlap. Because we do not know "
  404. "these pdf's we make the assumption that both are normal, have equal "
  405. "%sigma and are one-dimensional. The parameter to be determined is the "
  406. "distance between the centres of both pdf's. "
  407. "According to formula 26.2.23 in @@Abramowitz & Stegun (1970)@, for each "
  408. "fraction %f__%ij_, we have to find an %x that solves:")
  409. FORMULA (U"%f__%ij_ = 1 / \\Vr(2%\\pi) \\in__%x_^^\\oo^ e^^-%t\\.c%t/2^ %dt")
  410. NORMAL (U"This %x will be used as the dissimilarity between %i and %j. The "
  411. "relation between %x and %f__%ij_ is monotonic. This means that the "
  412. "results for a Kruskal analysis will not change much. For INDSCAL, in "
  413. "general, you will note a significantly better fit.")
  414. MAN_END
  415. MAN_BEGIN (U"Confusion: To Similarity...", U"djmw", 20040407)
  416. INTRO (U"A command that creates a @Similarity from every selected @Confusion.")
  417. ENTRY (U"Settings")
  418. TAG (U"##Normalize")
  419. DEFINITION (U"when on, normalize rows by dividing each row element by the row "
  420. "sum. In this way you correct for unequal stimulus numbers.")
  421. TAG (U"##No symmetrization#, #Average, #Houtgast")
  422. DEFINITION (U"determine the symmetrization procedure.")
  423. ENTRY (U"Algorithm")
  424. NORMAL (U"The %Average procedure averages:")
  425. FORMULA (U"%similarity__%ij_= %similarity__%ji_ = (%confusion__%ij_ + "
  426. "%confusion__%ji_) / 2")
  427. NORMAL (U"The %Houtgast procedure as described in the paper by @@Klein, Plomp "
  428. "& Pols (1970)@, expresses similarity between stimuli %i and %j by the "
  429. "number of times that stimulus %i and %j have "
  430. "resulted in the same response, summated over all response categories.")
  431. NORMAL (U"We use the following formula to calculate the %Houtgast "
  432. "dissimilarities:")
  433. FORMULA (U"%similarity__%ij_ = \\su__%k=1..%numberOfColumns_ min "
  434. "(%confusion__%ik_, %confusion__%jk_)")
  435. NORMAL (U"which is equivalent to the formula in the Klein et al. paper:")
  436. FORMULA (U"%similarity__%ij_ = \\su__%k=1..%numberOfColumns_ (%confusion__%ik_ "
  437. "+ %confusion__%jk_ \\-- |%confusion__%ik_ \\-- %confusion__%jk_|)")
  438. MAN_END
  439. MAN_BEGIN (U"congruence coefficient", U"djmw", 20040407)
  440. INTRO (U"The %%congruence coefficient% is a measure of similarity between two "
  441. "@@Configuration@s.")
  442. NORMAL (U"The congruence coefficient %c(#X, #Y) for the configurations #X and "
  443. "#Y is defined as:")
  444. FORMULA (U"%c(%X, %Y) = \\su__%i<%j_ %w__%ij_ %d__%ij_(#X) %d__%ij_(#Y) / "
  445. "([\\su__%i<%j_ %w__%ij_ %d^2__%ij_(#X)]^^1/2^ [\\su__%i<%j_ %w__%ij_ "
  446. "%d^2__%ij_(#Y)]^^1/2^),")
  447. NORMAL (U"where %d__%ij_(#X) is the distance between the points %i and %j in "
  448. "configuration #X and %w__%ij_ are nonnegative weights (default: %w__%ij_"
  449. " = 1).")
  450. NORMAL (U"Since distances are nonnegative, the congruence coefficient has a "
  451. "value between 0 and 1.")
  452. NORMAL (U"The %%congruence coefficient% is a better measure of the similarity "
  453. "between configurations than the %%correlation coefficient% of the "
  454. "distances. @@Borg & Groenen (1997)@ give a simple example where things "
  455. "go wrong with correlation coefficients: two configurations #X and #Y with three points each, have "
  456. "distances %d__12_(#X) = 1, %d__13_(#X) = 2, %d__23_(#X) = 3 and "
  457. "%d__12_(#Y) = 2, %d__13_(#Y) = 3, %d__23_(#Y) = 4. "
  458. "These distances have a correlation coefficient of 1. "
  459. "However, in #X the three points lie on a straight line and in #Y the "
  460. "points form a triangle. This unwanted situation occurs because "
  461. "in the calculation of the correlation coefficient the mean is subtracted "
  462. "from the distances and the resulting values are no longer distances "
  463. "(they may become negative). In calculating the correlation "
  464. "between the distances we should not subtract the mean. "
  465. "In fact, the congruence coefficient is exactly this correlation "
  466. "coefficient calculated with respect to the origin and "
  467. "not with respect to the centroid position (the \"mean\").")
  468. NORMAL (U"For further information on how well one number can assess the "
  469. "similarity between two configurations see @@Borg & Groenen (1997)@ "
  470. "section 19.7.")
  471. MAN_END
  472. MAN_BEGIN (U"ContingencyTable", U"djmw", 19971216)
  473. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  474. NORMAL (U"In a two-way contingency table, cell %f__%ij_ contains the frequency "
  475. "with which row category %i co-occurs with column category %j. "
  476. "Necessarily, all %f__%ij_ \\>_ 0.")
  477. ENTRY (U"Commands")
  478. NORMAL (U"Creation")
  479. LIST_ITEM (U"\\bu ##TableOfReal: To ##ContingencyTable")
  480. NORMAL (U"Query")
  481. LIST_ITEM (U"\\bu ##ContingencyTable: Get chi squared probability")
  482. LIST_ITEM (U"\\bu ##ContingencyTable: Get Cramer's statistic")
  483. LIST_ITEM (U"\\bu ##ContingencyTable: Get contingency coefficient")
  484. NORMAL (U"Analysis")
  485. LIST_ITEM (U"\\bu @@ContingencyTable: To Configuration (ca)...")
  486. MAN_END
  487. MAN_BEGIN (U"ContingencyTable: To Configuration (ca)...", U"djmw", 20040407)
  488. INTRO (U"A command that creates a @Configuration object from the selected "
  489. "@ContingencyTable object by means of @@Correspondence analysis@.")
  490. ENTRY (U"Settings")
  491. TAG (U"##Number of dimensions")
  492. DEFINITION (U"The dimensionality of the Configuration.")
  493. TAG (U"##Scaling of the final configuration")
  494. DEFINITION (U"determines whether row points are in the centre of gravity of "
  495. "column points, or, column points are in the centre of gravity of row "
  496. "points, or, whether roes and columns are treated symmetrically.")
  497. ENTRY (U"Algorithm")
  498. NORMAL (U"1. We start with the following transformation of the entries "
  499. "%f__%ij_:")
  500. FORMULA (U"%h__%ij_ = %f__%ij_ / \\Vr (%f__%i+_%f__+%j_) - \\Vr "
  501. "(%f__%i+_%f__+%j_) / %N,")
  502. NORMAL (U"where %h__%ij_ is the entry for a cell in the matrix #H with "
  503. "transformed data, %f__%i+_ "
  504. "is the total count for row %i, %f__+%j_ is the total count for column %j "
  505. "and %N is the grand total. "
  506. "This can be written in matrix form as:")
  507. FORMULA (U"#H = #R^^\\--1/2^#F#C^^\\--1/2^ \\-- #R^^1/2^#uu\\'p#C^^1/2^ / %N,")
  508. NORMAL (U"where #R and #C are diagonal matrices with the row and column totals, "
  509. "respectively and #u a column vector with all elements equal to 1. ")
  510. NORMAL (U"2. Next the singular value decomposition of matrix #H is performed:")
  511. FORMULA (U"#H = #K #\\La #L\\'p,")
  512. NORMAL (U"where #K\\'p#K = #I, #L\\'p#L = #I, and #\\La is a diagonal matrix "
  513. "with singular values.")
  514. NORMAL (U"3. Now the row (#X) and column points (#Y) can be determined. "
  515. "Three normalizations are possible:")
  516. TAG (U"\\bu Scale row points in the centre of gravity of column points")
  517. DEFINITION (U"#X = \\Vr%N #R^^\\--1/2^#K#\\La")
  518. DEFINITION (U"#Y = \\Vr%N #C^^\\--1/2^#U")
  519. TAG (U"\\bu Scale column points in the centre of gravity of row points")
  520. DEFINITION (U"#X = \\Vr%N #R^^\\--1/2^#K")
  521. DEFINITION (U"#Y = \\Vr%N #C^^\\--1/2^#L#\\La")
  522. TAG (U"\\bu Treat row points and column points symmetrically")
  523. DEFINITION (U"#X = \\Vr%N #R^^\\--1/2^#K#\\La^^\\--1/2^")
  524. DEFINITION (U"#Y = \\Vr%N #C^^\\--1/2^#L\\La^^\\--1/2^")
  525. NORMAL (U"For more details see @@Gifi (1990)@, chapter 8.")
  526. MAN_END
  527. MAN_BEGIN (U"Correspondence analysis", U"djmw", 19971216)
  528. INTRO (U"Correspondence analysis provides a method for representing data in "
  529. "an Euclidean space so that the results can be visually examined for "
  530. "structure. For data in a typical two-way @ContingencyTable both the row "
  531. "variables and the column variables are represented in the same space. "
  532. "This means that one can examine relations not only among row "
  533. "or column variables but also between row and column variables.")
  534. NORMAL (U"In correspondence analysis the data matrix is first transformed by "
  535. "dividing each cell by the square root of the corresponding row and column "
  536. "totals. "
  537. "The transformed matrix is then decomposed with singular value "
  538. "decomposition resulting in the singular values (which in this case are "
  539. "canonical correlations) and a set of row vectors and column vectors. "
  540. "Next the row and column vectors are rescaled with the original total "
  541. "frequencies to obtain optimal scores. "
  542. "These optimal scores are weighted by the square root of the singular "
  543. "values and become the coordinates of the points in the @Configuration.")
  544. NORMAL (U"Examples can be found in the books by @@Weller & Romney (1990)@ and "
  545. "@@Gifi (1990)@.")
  546. MAN_END
  547. MAN_BEGIN (U"Create Configuration...", U"djmw", 19980413)
  548. INTRO (U"A command to create a @Configuration with the specified number of "
  549. "points and number of dimensions. The location of the points will be "
  550. "determined by the formula (see @@Formulas@ for more "
  551. "information about possible formulas).")
  552. MAN_END
  553. MAN_BEGIN (U"Create INDSCAL Carroll & Wish example...", U"djmw", 19971201)
  554. INTRO (U"Creates eight @Dissimilarity objects that bear names \"1\" ... \"8\".")
  555. NORMAL (U"These objects contain the interpoint distances for a twodimensional "
  556. "3\\xx3 @Configuration of points, labelled A, B, C, ... I. "
  557. "All Dissimilarity objects are based on the following underlying configuration.")
  558. PICTURE (4.0, 4.0, drawCarrollWishConfigurationExample)
  559. NORMAL (U"The eight sources weigh this configuration in the following manner:")
  560. PICTURE (4.0, 4.0, drawCarrollWishSalienceExample)
  561. NORMAL (U"For each source, the distances were subjected to the transformation: ")
  562. FORMULA (U"%dissimilarity__%ij_ = %distance__%ij_ + %noiseRange \\.c #u, ")
  563. NORMAL (U"where #u is a uniform random variable between 0 and 1.")
  564. NORMAL (U"Now you can do the following for example:")
  565. TAG (U"Select all the Dissimilarity objects and choose @@Dissimilarity: To Distance...|"
  566. "To Distance...@.")
  567. DEFINITION (U"Uncheck scale (add \"additive constant\").")
  568. TAG (U"Select all the Distance objects and choose @@Distance: To Configuration (indscal)...|"
  569. "To Configuration (indscal)...@.")
  570. DEFINITION (U"and an @@INDSCAL analysis@ will be performed. In order to reproduce the saliences, "
  571. "you have to uncheck the \"Normalize scalar products\" option.")
  572. NORMAL (U"This example was adapted from @@Carroll & Wish (1974)@.")
  573. MAN_END
  574. MAN_BEGIN (U"Create letter R example...", U"djmw", 19971201)
  575. INTRO (U"Creates a @Dissimilarity object that bears the name %R. The "
  576. "dissimilarities in this object were chosen to be a monotone "
  577. "transformation of the distances between the 32 two-dimensional points "
  578. "that make up the capital letter #R.")
  579. PICTURE (4.0, 4.0, drawLetterRConfigurationExample)
  580. NORMAL (U"All 32 \\.c (32-1)/2 interpoint distances were subjected to the "
  581. "transformation: ")
  582. FORMULA (U"%dissimilarity__%ij_^ = %distance__%ij_^2 + 5 + %noiseRange \\.c #u, ")
  583. NORMAL (U"where #u is a uniform random variable between 0 and 1.")
  584. NORMAL (U"This example was chosen from @@Green, Carmone & Smith (1989)@.")
  585. MAN_END
  586. MAN_BEGIN (U"disparities", U"djmw", 19980111)
  587. INTRO (U"The numbers %d\\'p__%ij_ that result from applying an admissible "
  588. "transformation %f on the dissimilarities %\\de__%ij_, i.e., %d\\'p__%ij_ "
  589. "= %f (%\\de__%ij_). Disparities have the same dimension as distances. "
  590. "Other names for disparities are %%pseudo distances% and %%target "
  591. "distances%.")
  592. MAN_END
  593. MAN_BEGIN (U"Dissimilarity", U"djmw", 20010327)
  594. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  595. NORMAL (U"It represents a one-way table with "
  596. "dissimilarities between \"objects\".")
  597. ENTRY (U"Creating a Dissimilarity from data in a text file")
  598. NORMAL (U"Suppose you have three objects A, B and C. "
  599. "In one way or another, you have acquired the following (symmetric) "
  600. "dissimilarities: %\\de__%AB_ = 2 (= %\\de__%BA_) , %\\de__%AC_ = 1 "
  601. "(= %\\de__%CA_), and %\\de__%BC_ = 1.4 (= %\\de__CB_), where %\\de__%AB_"
  602. " represents the dissimilarity between object A and object B.")
  603. NORMAL (U"You can create a simple text file like the following:")
  604. CODE (U"\"ooTextFile\" ! The line by which Praat can recognize your file")
  605. CODE (U"\"Dissimilarity\" ! The line that tells Praat about the contents")
  606. CODE (U"3 \"A\" \"B\" \"C\" ! Number of columns, and column labels")
  607. CODE (U"3 ! Number of rows")
  608. CODE (U"\"A\" 0 2 1 ! Row label (A), A-B value, A-C value")
  609. CODE (U"\"B\" 2 0 1.4 ! Row label (B), B-A value, B-C value")
  610. CODE (U"\"C\" 1 1.4 0 ! Row label (C), C-A value, C-B value")
  611. NORMAL (U"Notice that:")
  612. LIST_ITEM (U"\\bu the row and column labels are identical.")
  613. LIST_ITEM (U"\\bu the matrix elements on the diagonal are zero.")
  614. LIST_ITEM (U"\\bu the matrix is symmetrical.")
  615. NORMAL (U"This text file can be read with the @@Read from file...@ command. "
  616. "Since a Dissimilarity object has the data structure of a square "
  617. "symmetrical TableOfReal, you could also start from an appropriate "
  618. "@TableOfReal object and cast it to a Dissimilarity object.")
  619. ENTRY (U"Commands")
  620. NORMAL (U"Creation")
  621. LIST_ITEM (U"\\bu @@Confusion: To Dissimilarity...")
  622. NORMAL (U"Drawing")
  623. LIST_ITEM (U"\\bu ##Draw as numbers...")
  624. LIST_ITEM (U"\\bu ##Draw as squares...")
  625. NORMAL (U"Query")
  626. LIST_ITEM (U"\\bu ##Get column mean (index)...")
  627. LIST_ITEM (U"\\bu ##Get column mean (label)...")
  628. LIST_ITEM (U"\\bu ##Get column stdev (index)...")
  629. LIST_ITEM (U"\\bu ##Get column stdev (label)...")
  630. LIST_ITEM (U"\\bu @@Dissimilarity: Get additive constant")
  631. NORMAL (U"Modification")
  632. LIST_ITEM (U"\\bu @@Formula...")
  633. LIST_ITEM (U"\\bu ##Set value...")
  634. LIST_ITEM (U"\\bu ##Remove column (index)...")
  635. LIST_ITEM (U"\\bu ##Insert column (index)...")
  636. LIST_ITEM (U"\\bu ##Set row label (index)...")
  637. LIST_ITEM (U"\\bu ##Set row label (label)...")
  638. LIST_ITEM (U"\\bu ##Set column label (index)...")
  639. LIST_ITEM (U"\\bu ##Set column label (label)...")
  640. NORMAL (U"Multidimensional scaling analysis")
  641. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (monotone mds)...")
  642. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (i-spline mds)...")
  643. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (interval mds)...")
  644. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (ratio mds)...")
  645. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (absolute mds)...")
  646. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (kruskal)...")
  647. LIST_ITEM (U"Transformations")
  648. LIST_ITEM (U"\\bu @@Dissimilarity: To Distance...")
  649. LIST_ITEM (U"\\bu @@Dissimilarity: To Weight")
  650. MAN_END
  651. MAN_BEGIN (U"Dissimilarity: Get additive constant", U"djmw", 19971201)
  652. INTRO (U"A command that calculates the \"additive constant\" from the selected @Dissimilarity.")
  653. NORMAL (U"Distances %d__%ij_ will be obtained from dissimilarities %\\de__%ij_ according to:")
  654. FORMULA (U" %distance__%ij_ = %dissimilarity__%ij_ + %additiveConstant")
  655. NORMAL (U"We use a procedure by @@Cailliez (1983)@ to solve the \"additive constant problem\", i.e. "
  656. "find the smallest %additiveConstant such that all %distance__%ij_ in the above equation "
  657. " have a Euclidean representation.")
  658. MAN_END
  659. MAN_BEGIN (U"Dissimilarity: To Configuration (absolute mds)...", U"djmw", 19980105)
  660. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity object.")
  661. NORMAL (U"The @disparities %d\\'p__%ij_ will be obtained from dissimilarities %\\de__%ij_ according to:")
  662. FORMULA (U"%d\\'p__%ij_ = %\\de__%ij_")
  663. MAN_END
  664. MAN_BEGIN (U"Dissimilarity: To Configuration (interval mds)...", U"djmw", 19980105)
  665. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity object.")
  666. NORMAL (U"The @disparities %d\\'p__%ij_ will be obtained from dissimilarities %\\de__%ij_ according to:")
  667. FORMULA (U"%d\\'p__%ij_ = %a + %b \\.c %\\de__%ij_")
  668. MAN_END
  669. MAN_BEGIN (U"Dissimilarity: To Configuration (i-spline mds)...", U"djmw", 20040407)
  670. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity object.")
  671. NORMAL (U"Dissimilarities %\\de__%ij_ and @disparities %d\\'p__%ij_ will be related by a @spline function:")
  672. FORMULA (U"%d\\'p__%ij_ = \\su__%k=1..(%%numberOfInteriorKnots%+%order)_ spline__%k_ (%knots, %order, %\\de__%ij_),")
  673. NORMAL (U"where spline__%k_ (\\.c) is the value of the %k^^th^ I-spline of order %order and knot sequence "
  674. "%knot evaluated at %\\de__%ij_.")
  675. ENTRY (U"Settings")
  676. TAG (U"##Number of dimensions")
  677. DEFINITION (U"determines the dimensionality of the configuration.")
  678. TAG (U"##Number of interior knots")
  679. DEFINITION (U"determines the number of segment boundaries. Each interior knot "
  680. "is the boundary between two segments. The splines in each segment will "
  681. "be joined as continuously as possible.")
  682. TAG (U"##Order of I-spline")
  683. DEFINITION (U"The order of the polynomial basis of the I-spline.")
  684. NORMAL (U"Finding the optimal Configuration involves a minimization process:")
  685. TAG (U"##Tolerance")
  686. DEFINITION (U"When successive values for the stress differ by less than "
  687. "#Tolerance, the minimization process stops.")
  688. TAG (U"##Maximum number of iterations")
  689. DEFINITION (U"Minimization stops after this number of iterations has been "
  690. "reached.")
  691. TAG (U"##Number of repetitions")
  692. DEFINITION (U"If chosen larger than 1, the minimization process will be "
  693. "repeated, each time with another random start configuration. "
  694. "The configuration that results in minimum stress, will be saved.")
  695. ENTRY (U"Hints")
  696. NORMAL (U"If %numberOfInteriorKnots is zero, polynomial regression will be "
  697. "performed. Therefore , the combination %numberOfInteriorKnots = 0 and "
  698. "%order = 1 also gives interval "
  699. "scaling (in fact, it is the implementation in this program).")
  700. NORMAL (U"In the limit when %order = 0 and %numberOfInteriorKnots = "
  701. "%numberOfDissimilarities, monotone regression is performed.")
  702. MAN_END
  703. MAN_BEGIN (U"Dissimilarity: To Configuration (kruskal)...", U"djmw", 20040407)
  704. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  705. "object.")
  706. ENTRY (U"Settings")
  707. TAG (U"##Number of dimensions# (standard value: 2)")
  708. DEFINITION (U"The dimensionality of the Configuration.")
  709. TAG (U"##Distance metric% (standard value: 2, i.e. Euclidean)")
  710. DEFINITION (U"the general distance between points #x__%i_ and #x__%j_ (%i,%j "
  711. "= 1..%numberOfPoints) is:")
  712. DEFINITION (U"(\\su__%k=1..%numberOfDimensions_ |%x__%ik_ \\--%x__%jk_|"
  713. "^^%metric^)^^1/%metric^")
  714. TAG (U"##Sort distances")
  715. DEFINITION (U"determines the handling of ties in the data. When off, whenever "
  716. "two or more dissimilarities are equal we do not care whether the fitted "
  717. "distances are equal or not. "
  718. "Consequently, no constraints are imposed on the fitted distances. "
  719. "When on, however, we impose the constaint that the fitted distances be "
  720. "equal whenever the dissimilarities are equal.")
  721. NORMAL (U"For the calculation of stress:")
  722. TAG (U"##Formula1 (default)") // ??
  723. FORMULA (U"%stress = \\Vr(\\su(%distance__%k_ \\-- %fittedDistance__%k_)^2 / "
  724. "\\su %distance__%k_^2)")
  725. TAG (U"##Formula2")
  726. FORMULA (U"%stress = \\Vr(\\su(%distance__%k_ \\-- %fittedDistance__%k_)^2 / "
  727. "\\su (%distance__%k_ \\-- %averageDistance)^2)")
  728. DEFINITION (U"Note that values of stress 2 are generally more than double those "
  729. "of stress 1 for the same degree of fit.")
  730. NORMAL (U"Finding the optimal Configuration involves a minimization process:")
  731. TAG (U"##Tolerance")
  732. DEFINITION (U"When successive values for the stress differ less than %Tolerance "
  733. "the minimization process stops.")
  734. TAG (U"##Maximum number of iterations")
  735. DEFINITION (U"Minimization stops after this number of iterations has been "
  736. "reached.")
  737. TAG (U"##Number of repetitions")
  738. DEFINITION (U"When chosen larger than 1, the minimalization process will be "
  739. "repeated, each time with another random start configuration. "
  740. "The configuration that results in minimum stress will be saved.")
  741. ENTRY (U"Precautions")
  742. NORMAL (U"When there are few objects it is impossible to recover many "
  743. "dimensions. A rough rule of thumb is that there should be at least twice "
  744. "as many number of observations, i.e. the %numberOfPoints \\.c "
  745. "(%numberOfPoints - 1) / 2 (dis)similarities, than parameters "
  746. "to be estimated, i.e. the %numberOfPoints \\.c %numberOfDimensions "
  747. "position coordinates. A practical guide is:")
  748. LIST_ITEM (U"for %numberOfDimensions = 1 you need \\>_ 5 objects")
  749. LIST_ITEM (U"for %numberOfDimensions = 2 you need \\>_ 9 objects")
  750. LIST_ITEM (U"for %numberOfDimensions = 3 you need \\>_ 13 objects")
  751. NORMAL (U"There is no feasible way to be certain that you have found the "
  752. "true global minimum. However, by using a great number of different "
  753. "random starting configurations to scale the same data it is often "
  754. "possible to obtain practical certainty. "
  755. "Although the procedure for obtaining an initial configuration is based "
  756. "on a %linear relation between distance and (dis)similarity, it gives a "
  757. "very good approximation of the optimal #Configuration and "
  758. "the #Minimizer practically always finds the global minimum from it "
  759. "(I guess...). A way to find out is to try the %numberOfRepetitions "
  760. "parameter which gives you the possibility to fit many times and each "
  761. "time start with another random initial configuration.")
  762. ENTRY (U"Algorithm")
  763. LIST_ITEM (U"1. The Dissimilarity object is converted to a Distance object in "
  764. "the same way as in @@Dissimilarity: To Distance...@.)")
  765. LIST_ITEM (U"2. From the Distance object an initial Configuration is found by "
  766. "first transforming the Distance object to a matrix with scalar products "
  767. "of distances and subsequently solving for the first %numberOfDimensions "
  768. "eigenvectors of this matrix.")
  769. LIST_ITEM (U"3. A minimalization algorithm is started that tries to minimize a "
  770. "function. In this function:")
  771. LIST_ITEM (U"\\bu 3.1 We normalize the current Configuration from the minimizer")
  772. LIST_ITEM (U"\\bu 3.2 Calculate a new Distance object from the configuration")
  773. LIST_ITEM (U"\\bu 3.3 Do a monotone regression of this Distance on the "
  774. "Dissimilarity. This results in a new Distance object.")
  775. LIST_ITEM (U"\\bu 3.4 Calculate stress from this Distance and the Distance "
  776. "obtained from Dissimilarity.")
  777. NORMAL (U"The optimization process is ccontrolledby a conjugate gradient "
  778. "minimization algorithm that tries to minimize the %stress function. "
  779. "In @@Kruskal (1964)@, a steepest descent "
  780. "algorithm is used wwhichis less efficient. ")
  781. MAN_END
  782. MAN_BEGIN (U"Dissimilarity: To Configuration (monotone mds)...", U"djmw", 20040407)
  783. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  784. "object.")
  785. NORMAL (U"Dissimilarities %\\de__%ij_ and @disparities %d\\'p__%ij_ are "
  786. "related by:")
  787. FORMULA (U"%d\\'p__%ij_ \\<_ %d\\'p__%kl_ if %\\de__%ij_ \\<_ %\\de__%kl_")
  788. ENTRY (U"Settings")
  789. TAG (U"##Number of dimensions")
  790. DEFINITION (U"determines the number of dimensions of the configuration.")
  791. TAG (U"##Primary or secondary approach to ties")
  792. DEFINITION (U"When dissimilarities are equal, i.e., %\\de__%ij_ = %\\de__%kl_, "
  793. "the primary approach imposes no conditions on the corresponding "
  794. "@disparities %d\\'p__%ij_ and %d\\'p__%kl_, while the %secondary "
  795. "approach demands that also %d\\'p__%ij_ = %d\\'p__%kl_.")
  796. NORMAL (U"Finding the optimal Configuration involves a minimization process:")
  797. TAG (U"##Tolerance")
  798. DEFINITION (U"When successive values for the stress differ less than %Tolerance "
  799. "the minimization process stops.")
  800. TAG (U"##Maximum number of iterations")
  801. DEFINITION (U"Minimization stops after this number of iterations has been reached.")
  802. TAG (U"##Number of repetitions")
  803. DEFINITION (U"When chosen larger than 1, the minimalization process will be "
  804. "repeated, each time with another random start configuration. "
  805. "The configuration that results in minimum stress will be saved.")
  806. MAN_END
  807. MAN_BEGIN (U"Dissimilarity: To Configuration (ratio mds)...", U"djmw", 19980105)
  808. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  809. "object.")
  810. NORMAL (U"The @disparities %d\\'p__%ij_ will be obtained from dissimilarities "
  811. "%\\de__%ij_ according to:")
  812. FORMULA (U"%d\\'p__%ij_ = %b \\.c %\\de__%ij_")
  813. MAN_END
  814. MAN_BEGIN (U"Dissimilarity: To Distance...", U"djmw", 20040407)
  815. INTRO (U"A command that creates a @Distance object from a selected "
  816. "@Dissimilarity object.")
  817. ENTRY (U"Settings")
  818. TAG (U"##Scale")
  819. DEFINITION (U"when on, the @@Dissimilarity: Get additive constant|"
  820. "additiveConstant@ is determined, when off the %additiveConstant = 0.")
  821. NORMAL (U"dissimilarities are transformed to distances according to:")
  822. FORMULA (U" %distance__%ij_ = %dissimilarity__%ij_ + %additiveConstant.")
  823. MAN_END
  824. MAN_BEGIN (U"Dissimilarity: To Weight", U"djmw", 19980108)
  825. INTRO (U"Creates an object of type @Weight for each selected @Dissimilarity "
  826. "object.")
  827. NORMAL (U"The values in the weight matrix will be:")
  828. LIST_ITEM (U"%w__%ii_ = 0")
  829. LIST_ITEM (U"%w__%ij_ = 1 if %\\de__%ij_ > 0")
  830. MAN_END
  831. MAN_BEGIN (U"Dissimilarity & Configuration: Draw regression (absolute mds)...",
  832. U"djmw", 20040407)
  833. INTRO (U"Draws a scatterplot of the dissimilarities %\\de__%ij_ from the "
  834. "selected @Dissimilarity object versus @disparities %d\\'p__%ij_ obtained "
  835. "from the \"regression\" of distances %d__%ij_ "
  836. "from @Configuration on the dissimilarities %\\de__%ij_.")
  837. FORMULA (U"%d\\'p__%ij_ = %\\de__%ij_")
  838. ENTRY (U"Settings")
  839. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  840. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  841. TAG (U"##Minimum distance#, ##Maximum distance#")
  842. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  843. TAG (U"##Mark size (mm)#, ##Mark string#")
  844. DEFINITION (U"size and kind of the marks in the plot.")
  845. TAG (U"##Garnish")
  846. DEFINITION (U"when on, draws a bounding box with decoration.")
  847. MAN_END
  848. MAN_BEGIN (U"Dissimilarity & Configuration: Draw regression (interval mds)...",
  849. U"djmw", 20040407)
  850. INTRO (U"Draws a scatterplot of the dissimilarities %\\de__%ij_ from the "
  851. "selected @Dissimilarity versus @disparities %d\\'p__%ij_ obtained "
  852. "from the regression of distances %d__%ij_ "
  853. "from @Configuration on the dissimilarities %\\de__%ij_.")
  854. FORMULA (U"%d\\'p__%ij_ = %a + %b \\.c %\\de__%ij_,")
  855. NORMAL (U"where the values of %a and %b are determined by regression.")
  856. ENTRY (U"Settings")
  857. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  858. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  859. TAG (U"##Minimum distance#, ##Maximum distance#")
  860. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  861. TAG (U"##Mark size (mm)#, ##Mark string#")
  862. DEFINITION (U"size and kind of the marks in the plot.")
  863. TAG (U"##Garnish")
  864. DEFINITION (U"when on, draws a bounding box with decoration.")
  865. MAN_END
  866. MAN_BEGIN (U"Dissimilarity & Configuration: Draw regression (i-spline mds)...", U"djmw", 20040407)
  867. INTRO (U"Draws a scatterplot of the dissimilarities %\\de__%ij_ from the "
  868. "selected @Dissimilarity versus @disparities %d\\'p__%ij_ obtained "
  869. "from the regression of distances %d__%ij_ from @Configuration on the "
  870. "@spline transformed dissimilarities %\\de__%ij_.")
  871. ENTRY (U"Settings")
  872. TAG (U"##Number of interior knots")
  873. DEFINITION (U"determines the number of segments.")
  874. TAG (U"##Order of I-spline")
  875. DEFINITION (U"The order of the polynomial basis of the I-spline.")
  876. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  877. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  878. TAG (U"##Minimum distance#, ##Maximum distance#")
  879. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  880. TAG (U"##Mark size (mm)#, ##Mark string#")
  881. DEFINITION (U"size and kind of the marks in the plot.")
  882. TAG (U"##Garnish")
  883. DEFINITION (U"when on, draws a bounding box with decoration.")
  884. MAN_END
  885. MAN_BEGIN (U"Dissimilarity & Configuration: Draw regression (monotone mds)...", U"djmw", 20040407)
  886. INTRO (U"Draws a scatterplot of the dissimilarities %\\de__%ij_ from the "
  887. "selected @Dissimilarity versus @disparities %d\\'p__%ij_ obtained "
  888. "from the monotone regression of distances %d__%ij_ "
  889. "from @Configuration on the dissimilarities %\\de__%ij_.")
  890. ENTRY (U"Settings")
  891. TAG (U"##Primary or secondary approach to ties")
  892. DEFINITION (U"When dissimilarities are equal, i.e., %\\de__%ij_ = %\\de__%kl_ "
  893. "the primary approach imposes no conditions on the corresponding distances "
  894. "%d__%ij_ and %d__%kl_, while the %secondary approach demands that also "
  895. "%d__%ij_ = %d__%kl_.")
  896. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  897. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  898. TAG (U"##Minimum distance#, ##Maximum distance#")
  899. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  900. TAG (U"##Mark size (mm)#, ##Mark string#")
  901. DEFINITION (U"size and kind of the marks in the plot.")
  902. TAG (U"##Garnish")
  903. DEFINITION (U"when on, draws a bounding box with decoration.")
  904. MAN_END
  905. MAN_BEGIN (U"Dissimilarity & Configuration: Draw regression (ratio mds)...", U"djmw", 20040407)
  906. INTRO (U"Draws a scatterplot of the dissimilarities %\\de__%ij_ from the "
  907. "selected @Dissimilarity versus @disparities %d\\'p__%ij_ obtained "
  908. "from the \"regression\" of distances %d__%ij_ "
  909. "from @Configuration on the dissimilarities %\\de__%ij_.")
  910. FORMULA (U"%d\\'p__%ij_ = %b \\.c %\\de__%ij_,")
  911. NORMAL (U"where the value of %b is determined by regression.")
  912. ENTRY (U"Settings")
  913. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  914. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  915. TAG (U"##Minimum distance#, ##Maximum distance#")
  916. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  917. TAG (U"##Mark size (mm)#, ##Mark string#")
  918. DEFINITION (U"size and kind of the marks in the plot.")
  919. TAG (U"##Garnish")
  920. DEFINITION (U"when on, draws a bounding box with decoration.")
  921. MAN_END
  922. MAN_BEGIN (U"Dissimilarity & Configuration: Draw Shepard diagram...", U"djmw", 20040407)
  923. INTRO (U"Draws the Shepard diagram. This is a scatterplot of the "
  924. "dissimilarities from the @Dissimilarity object versus distances (as "
  925. "calculated from the @Configuration).")
  926. ENTRY (U"Settings")
  927. TAG (U"##Minimum proximity#, ##Maximum proximity#")
  928. DEFINITION (U"minimum and maximum values for the proximities (horizontal axis).")
  929. TAG (U"##Minimum distance#, ##Maximum distance#")
  930. DEFINITION (U"minimum and maximum values for the distances (vertical axis).")
  931. TAG (U"##Mark size (mm)#, ##Mark string#")
  932. DEFINITION (U"size and kind of the marks in the plot.")
  933. TAG (U"##Garnish")
  934. DEFINITION (U"when on, draws a bounding box with decoration.")
  935. MAN_END
  936. MAN_BEGIN (U"Dissimilarity & Configuration: Get stress (absolute mds)...",
  937. U"djmw", 19980119)
  938. INTRO (U"A command to obtain the @stress value for the selected @Dissimilarity "
  939. "and @Configuration object.")
  940. ENTRY (U"Behaviour")
  941. NORMAL (U"Stress formula's are #dependent of the scale of the Configuration: "
  942. "you will get #another stress value if you had pre-multiplied the "
  943. "selected Configuration with any number greater than zero.")
  944. MAN_END
  945. MAN_BEGIN (U"Dissimilarity & Configuration: Get stress (interval mds)...",
  946. U"djmw", 19980119)
  947. INTRO (U"A command to obtain the @stress value for the selected @Dissimilarity "
  948. "and @Configuration object.")
  949. ENTRY (U"Behaviour")
  950. NORMAL (U"We use stress formula's that are independent of the scale of the "
  951. "Configuration: you would have got the same stress value if you had "
  952. "pre-multiplied the selected Configuration with any number greater "
  953. "than zero.")
  954. MAN_END
  955. MAN_BEGIN (U"Dissimilarity & Configuration: Get stress (i-spline mds)...",
  956. U"djmw", 19980119)
  957. INTRO (U"A command to obtain the @stress value for the selected @Dissimilarity "
  958. "and @Configuration object.")
  959. ENTRY (U"Behaviour")
  960. NORMAL (U"We use stress formula's that are independent of the scale "
  961. "of the Configuration: you would have got the same stress value if "
  962. "you had pre-multiplied the selected Configuration with any number "
  963. "greater than zero.")
  964. MAN_END
  965. MAN_BEGIN (U"Dissimilarity & Configuration: Get stress (monotone mds)...",
  966. U"djmw", 19980119)
  967. INTRO (U"A command to obtain the @stress value for the selected @Dissimilarity "
  968. "and @Configuration object.")
  969. ENTRY (U"Behaviour")
  970. NORMAL (U"We use stress formula's that are independent of the scale "
  971. "of the Configuration: you would have got the same stress value if "
  972. "you had pre-multiplied the selected Configuration with any number "
  973. "greater than zero.")
  974. MAN_END
  975. MAN_BEGIN (U"Dissimilarity & Configuration: Get stress (ratio mds)...",
  976. U"djmw", 19980119)
  977. INTRO (U"A command to obtain the @stress value for the selected @Dissimilarity "
  978. "and @Configuration object.")
  979. ENTRY (U"Behaviour")
  980. NORMAL (U"We use stress formula's that are independent of the scale "
  981. "of the Configuration: you would have got the same stress value if "
  982. "you had pre-multiplied the selected Configuration with any number "
  983. "greater than zero.")
  984. MAN_END
  985. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (absolute mds)...",
  986. U"djmw", 19980119)
  987. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  988. "object. The selected Configuration object serves as a starting "
  989. "configuration for the minimization process.")
  990. MAN_END
  991. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (interval mds)...",
  992. U"djmw", 19980119)
  993. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  994. "object. The selected Configuration object serves as a starting "
  995. "configuration for the minimization process.")
  996. MAN_END
  997. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (i-spline mds)...",
  998. U"djmw", 19980119)
  999. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1000. "object. The selected Configuration object serves as a starting "
  1001. "configuration for the minimization process.")
  1002. MAN_END
  1003. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (kruskal)...",
  1004. U"djmw", 19971201)
  1005. INTRO (U"A command to fit an optimal @Configuration for the selected "
  1006. "@Dissimilarity object. The selected @Configuration will be used as the "
  1007. "starting configuration in the kruskal analysis.")
  1008. MAN_END
  1009. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (monotone mds)...",
  1010. U"djmw", 19980119)
  1011. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1012. "object. The selected Configuration object serves as a starting "
  1013. "configuration for the minimization process.")
  1014. MAN_END
  1015. MAN_BEGIN (U"Dissimilarity & Configuration: To Configuration (ratio mds)...",
  1016. U"djmw", 19980119)
  1017. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1018. "object. The selected Configuration object serves as a starting "
  1019. "configuration for the minimization process.")
  1020. MAN_END
  1021. MAN_BEGIN (U"Dissimilarity & Configuration & Weight: Get stress...", U"djmw", 20040407)
  1022. INTRO (U"A command that calculates the @stress between distances %d__%ij_ "
  1023. "derived from the selected @Configuration object and @disparities "
  1024. "%d\\'p__%ij_ derived from the selected @Dissimilarity object. "
  1025. "With the selected @Weight object the evaluation of the influence "
  1026. "of each dissimilarity on stress can be influenced.")
  1027. ENTRY (U"Settings")
  1028. LIST_ITEM (U"%%Normalized stress%, %%Kruskal's stress-1%, %%Kruskal's "
  1029. "stress-2% or %Raw stress%")
  1030. ENTRY (U"Behaviour")
  1031. NORMAL (U"Except for %absolute %mds, we us stress formula's that are "
  1032. "independent of the scale of the Configuration (see @stress): you would "
  1033. "have got the same stress value if you had pre-multiplied the selected "
  1034. "Configuration with any number greater than zero.")
  1035. MAN_END
  1036. MAN_BEGIN (U"Dissimilarity & Configuration & Weight: To Configuration...", U"djmw", 20040407)
  1037. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1038. "object. With the selected @Weight object the influence of each "
  1039. "dissimilarity on @stress can be influenced. The selected Configuration "
  1040. "object serves as a starting configuration for the minimization process.")
  1041. ENTRY (U"Settings")
  1042. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (monotone mds)...")
  1043. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (i-spline mds)...")
  1044. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (interval mds)...")
  1045. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (ratio mds)...")
  1046. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (absolute mds)...")
  1047. MAN_END
  1048. MAN_BEGIN (U"Dissimilarity & Weight: To Configuration...", U"djmw", 20040407)
  1049. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1050. "object. With the selected @Weight object the influence of each "
  1051. "dissimilarity on @stress can be influenced.")
  1052. ENTRY (U"Settings")
  1053. NORMAL (U"May be different and depend on the representation function, i.e. "
  1054. "the scale of measurement.")
  1055. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (monotone mds)...")
  1056. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (i-spline mds)...")
  1057. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (interval mds)...")
  1058. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (ratio mds)...")
  1059. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (absolute mds)...")
  1060. MAN_END
  1061. MAN_BEGIN (U"Dissimilarity & Weight: To Configuration...", U"djmw", 20040407)
  1062. INTRO (U"A command that creates a @Configuration object from a @Dissimilarity "
  1063. "object. With the selected @Weight object the influence of each "
  1064. "dissimilarity on @stress can be influenced.")
  1065. ENTRY (U"Settings")
  1066. NORMAL (U"May be different and depend on the representation function, i.e. the scale of measurement.")
  1067. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (monotone mds)...")
  1068. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (i-spline mds)...")
  1069. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (interval mds)...")
  1070. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (ratio mds)...")
  1071. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (absolute mds)...")
  1072. MAN_END
  1073. MAN_BEGIN (U"Distance", U"djmw", 19971124)
  1074. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1075. NORMAL (U"An object of type Distance represents distances between objects in a metrical space.")
  1076. NORMAL (U"Creation")
  1077. LIST_ITEM (U"\\bu @@Confusion: To Dissimilarity (pdf)...")
  1078. LIST_ITEM (U"\\bu @@Dissimilarity: To Distance...")
  1079. MAN_END
  1080. MAN_BEGIN (U"Distance: To Configuration (indscal)...", U"djmw", 19971124)
  1081. INTRO (U"Perform an @@INDSCAL analysis@ on the selected object(s) of type @Distance that "
  1082. "results in a @Configuration and a @Salience object.")
  1083. MAN_END
  1084. MAN_BEGIN (U"Distance: To Configuration (ytl)...", U"djmw", 19971124)
  1085. INTRO (U"A command that creates one @Configuration and one @Salience object "
  1086. "from a collection of one or more @Distance objects.")
  1087. NORMAL (U"This Configuration and Salience object normally serve as starting points "
  1088. "for an @@individual difference scaling@ such as an @@INDSCAL analysis@.")
  1089. NORMAL (U"The algorithm is ddescribedin @@Young, Takane & Lewyckyj (1978)@.")
  1090. MAN_END
  1091. MAN_BEGIN (U"Distance: To ScalarProduct...", U"djmw", 20040407)
  1092. INTRO (U"A command that creates a @ScalarProduct for each selected @Distance.")
  1093. ENTRY (U"Setting")
  1094. TAG (U"##Make sum of squares equal 1.0")
  1095. DEFINITION (U"when selected, the elements in the resulting matrix part will be scaled such that "
  1096. "the sum of all the squared elements in the matrix equals 1.0.")
  1097. ENTRY (U"Algorithm")
  1098. NORMAL (U"ScalarProduct entries %b__%ij_ are created from distances %d__%ij_ bij double centering "
  1099. "the matrix with elements \\--1/2 %d__%ij_^2, i.e.,")
  1100. FORMULA (U"%b__%ij_= \\--1/2(%d__%ij_^2 \\-- %d__%\\.cj_^2 \\-- %d__%i\\.c_^2 + %d__%\\.c\\.c_^2),")
  1101. NORMAL (U"where the dot (\\.c) means averaging over that dimension.")
  1102. MAN_END
  1103. MAN_BEGIN (U"Distance & Configuration: Draw scatter diagram...", U"djmw", 19971201)
  1104. MAN_END
  1105. MAN_BEGIN (U"Distance & Configuration: Get VAF...", U"djmw", 19971201)
  1106. INTRO (U"Calculates the \"%%variance accounted for%\" from the selected collection of @Distance objects and the "
  1107. "selected @Configuration. The optimal @Salience necessary for the calculation "
  1108. "will be inferred from the selected Distance and Configuration objects.")
  1109. MAN_END
  1110. MAN_BEGIN (U"Distance & Configuration: To Configuration (indscal)...", U"djmw", 19971201)
  1111. INTRO (U"Performs an @@INDSCAL analysis@ on the selected objects of type @Distance and calculates "
  1112. "a @Configuration from them. Uses the selected Configuration object as the initial Configuration in "
  1113. "the iteration process.")
  1114. MAN_END
  1115. MAN_BEGIN (U"Distance & Configuration & Salience: Get VAF...", U"djmw", 19971201)
  1116. INTRO (U"Calculates the \"variance accounted for\" from the selected collection "
  1117. "of @Distance objects, the "
  1118. "selected @Configuration and the selected #Salience.")
  1119. MAN_END
  1120. MAN_BEGIN (U"Distance & Configuration & Salience: To Configuration "
  1121. "(indscal)...", U"djmw", 19971201)
  1122. INTRO (U"A command that creates a new @Configuration from the selected "
  1123. "collection of @Distance objects, the selected @Configuration and the "
  1124. "selected #Salience. The selected Configuration and Salience "
  1125. "serve as start values for the @@INDSCAL analysis@.")
  1126. MAN_END
  1127. MAN_BEGIN (U"individual difference scaling", U"djmw", 19970502)
  1128. INTRO (U"The purpose of individual difference scaling is to represent objects, "
  1129. "whose dissimilarities are given, as points in a metrical space. "
  1130. "The distances in the space should be in accordance with the "
  1131. "dissimilarities as well as is possible. Besides the configuration a "
  1132. "@Salience matrix is calculated.")
  1133. NORMAL (U"The basic Euclidean model is:")
  1134. LIST_ITEM (U"%\\de__%ijk_ \\~~ (\\su__%s=1..%r_ %w__%ks_(%x__%is_ \\-- "
  1135. "%x__%js_)^2)^^1/2^")
  1136. NORMAL (U"Here \\de__%ijk_ is the (known) dissimilarity between %objects %i and "
  1137. "%j, as measured on %data %source %k. The %x's are the %coordinates of "
  1138. "the objects in an %r-dimensional space and the %w's are weights or "
  1139. "saliences. Because straight minimization of the expression above "
  1140. "is difficult, one applies transformations on this expression. "
  1141. "Squaring both sides gives the model:")
  1142. LIST_ITEM (U"%\\de^2__%ijk_ \\~~ \\su__%s=1..%r_ %w__%ks_(%x__%is_ \\-- "
  1143. "%x__%js_)^2")
  1144. NORMAL (U"and the corresponding least squares loss function:")
  1145. LIST_ITEM (U"\\su__%k=1..%numberOfSources_ \\su__%i=1..%numberOfPoints_ "
  1146. "\\su__%j=1..%numberOfPoints_ (%\\de^2__%ijk_ \\-- %d^2__%ijk_)^2")
  1147. NORMAL (U"This loss function is minimized in the (ratio scale option of the) "
  1148. "#ALSCAL program of @@Takane, Young & de Leeuw (1976)@.")
  1149. NORMAL (U"The transformation used by @@Carroll & Chang (1970)@ in the INDSCAL "
  1150. "model, transforms the data from each source into scalar products "
  1151. "of vectors. For the dissimilarities:")
  1152. LIST_ITEM (U"%\\be__%ijk_ = \\--{ %\\de^2__%ijk_ \\-- %\\de^2__%i.%k_ \\-- "
  1153. "%\\de^2__.%jk_ + %\\de^2__..%k_ } / 2,")
  1154. NORMAL (U"where dots replacing indices indicate averaging over the range of "
  1155. "that index. In the same way for the distances:")
  1156. LIST_ITEM (U"%z__%ijk_ = \\--{ %d^2__%ijk_ \\-- %d^2__%i.%k_ \\-- %d"
  1157. "^2__%.%jk_ + %d^2__%..%k_ } / 2.")
  1158. LIST_ITEM (U"%\\be__%ijk_ \\~~ %z__%ijk_ = \\su__%s=1..%numberOfDimensions_ "
  1159. "%w__%ks_ %x__%is_ %x__%js_")
  1160. NORMAL (U"Translated into matrix algebra, the equation above translates to:")
  1161. LIST_ITEM (U"%B__%k_ \\~~ %Z__%k_ = %X %W__%k_ %X\\'p,")
  1162. NORMAL (U"where %X is a %numberOfPoints \\xx %numberOfDimensions configuration "
  1163. "matrix, %W__%k_, a non-negative %numberOfDimensions \\xx "
  1164. "%numberOfDimensions matrix with weights, and %B__%k_ "
  1165. "the %k^^th^ slab of %\\be__%ijk_.")
  1166. NORMAL (U"This translates to the following INDSCAL loss function:")
  1167. FORMULA (U"%f(%X, %W__1_,..., %W__%numberOfSources_) = "
  1168. "\\su__%k=1..%numberOfSources_ | %B__%k_ \\-- %X%W__%k_%X\\'p |^2")
  1169. NORMAL (U"")
  1170. MAN_END
  1171. MAN_BEGIN (U"INDSCAL analysis", U"djmw", 20120306)
  1172. INTRO (U"A method for @@individual difference scaling@ analysis in P\\s{RAAT}.")
  1173. NORMAL (U"An INDSCAL analysis can be performed on objects of type Distance.")
  1174. NORMAL (U"If you start with @Dissimilarity objects you first have to transform "
  1175. "them to Distance objects.")
  1176. LIST_ITEM (U"\\bu @@Dissimilarity: To Distance...@")
  1177. NORMAL (U"If you start with a @Confusion you can use:")
  1178. LIST_ITEM (U"\\bu @@Confusion: To Dissimilarity (pdf)...@")
  1179. ENTRY (U"Examples")
  1180. LIST_ITEM (U"\\bu @@Distance: To Configuration (indscal)...@")
  1181. DEFINITION (U"Perform an INDSCAL analysis on one or more objects of type "
  1182. "@Distance to calculate a @Configuration.")
  1183. LIST_ITEM (U"\\bu @@Distance & Configuration: To Configuration (indscal)...@")
  1184. DEFINITION (U"Perform an INDSCAL analysis on one or more objects of type "
  1185. "@Distance to calculate a @Configuration. Use the selected Configuration "
  1186. "object as the initial Configuration in the iteration process.")
  1187. ENTRY (U"Algorithm")
  1188. NORMAL (U"The function to be minimized in INDSCAL is the following:")
  1189. FORMULA (U"%f(%X, %W__1_,..., %W__%numberOfSources_) = "
  1190. "\\su__%i=1..%numberOfSources_ |%S__%i_ \\-- %XW__%i_%X\\'p|^2")
  1191. NORMAL (U"where %X an unknown %numberOfPoints x %numberOfDimensions "
  1192. "configuration matrix, the %W__%i_ are %numberOfSources unknown "
  1193. "diagonal %numberOfDimensions x %numberOfDimensions matrices with weights, "
  1194. "often called saliences, and the %S__%i_ are known symmetric "
  1195. "matrices with scalar products of dimension %numberOfPoints x "
  1196. "%numberOfPoints.")
  1197. NORMAL (U"In the absence of an algorithm that minimizes %f, @@Carroll & "
  1198. "Chang (1970)@ resorted to the @CANDECOMP algorithm, which instead of the "
  1199. "function given above minimizes the following function:")
  1200. FORMULA (U"%g(%X, %Y, %W__1_,..., %W__%numberOfSources_) = "
  1201. "\\su__%i=1..%numberOfSources_ |%S__%i_ \\-- %XW__%i_%Y\\'p|^2.")
  1202. NORMAL (U"Carroll & Chang claimed that for most practical circumstances %X "
  1203. "and %Y converge to matrices that will be columnwise proportional. "
  1204. "However, INDSCAL does not only require symmetry of the solution, "
  1205. "but also non-negativity of the weights. Both these aspects cannot be "
  1206. "guaranteed with the CANDECOMP algorithm.")
  1207. NORMAL (U"@@Ten Berge, Kiers & Krijnen (1993)@ describe an algorithm that "
  1208. "automatically satisfies symmetry because it solves %f directly, and, "
  1209. "also, can guarantee non-negativity of the weights. "
  1210. "This algorithm proceeds as follows:")
  1211. NORMAL (U"Let #%x__%h_ be the %h-th column of %X. We then write the function %f above as:")
  1212. FORMULA (U"%f(#%x__%h_, %w__1%h_, ..., %w__%numberOfSources %h_) = \\su__%i=1.."
  1213. "%numberOfSources_ |%S__%ih_ \\-- #%x__%h_%w__%ih_#%x\\'p__%h_|^2,")
  1214. NORMAL (U"with %S__%ih_ defined as:")
  1215. FORMULA (U"%S__%ih_ = (%S__%i_ - \\su__%j\\=/%h, %j=1..%numberOfDimensions_ "
  1216. "#%x__%j_%w__%ij_#%x\\'p__%j_).")
  1217. NORMAL (U"Without loss of generality we may require that")
  1218. FORMULA (U"#%x\\'p__%h_#%x__%h_ = 1")
  1219. NORMAL (U"Minimizing %f over #%x__%h_ is equivalent to minimizing")
  1220. FORMULA (U"\\su__%i=1..%numberOfSources_ |%S__%ih_|^2 \\-- 2tr \\su "
  1221. "%S__%ih_#%x__%h_%w__%ih_#%x\\'p__%h_ + \\su %w^2__%ih_")
  1222. NORMAL (U"This amounts to maximizing")
  1223. FORMULA (U"%g(#%x__%h_) = #%x\\'p__%h_(\\su %w__%ih_%S__%ih_)#%x__%h_")
  1224. NORMAL (U"subject to #%x\\'p__%h_#%x__%h_ = 1. The solution for #%x__%h_ is "
  1225. "the dominant eigenvector of (\\su %w__%ih_%S__%ih_), "
  1226. "which can be determined with the power method (see @@Golub & van Loan "
  1227. "(1996)@). The optimal value "
  1228. "for the %w__%ih_, given that all other parameters are fixed:")
  1229. FORMULA (U"%w__%ih_ = #%x\\'p__%h_%S__%ih_#%x__%h_")
  1230. NORMAL (U"In an alternating least squares procedure we may update columns of "
  1231. "%X and the diagonals of the %W matrices in any sensible order.")
  1232. MAN_END
  1233. MAN_BEGIN (U"Kruskal analysis", U"djmw", 19971201)
  1234. INTRO (U"One of the @@MDS models@ in P\\s{RAAT}.")
  1235. NORMAL (U"You can perform a Kruskal-type multidimensional scaling only on "
  1236. "objects of type @Dissimilarity. Objects of other types first have to "
  1237. "be converted to objects of Dissimilarity type.")
  1238. ENTRY (U"Example")
  1239. NORMAL (U"Convert a @Dissimilarity object into a @Configuration object.")
  1240. LIST_ITEM (U"\\bu @@Dissimilarity: To Configuration (monotone mds)...@")
  1241. DEFINITION (U"choose appropriate parameters")
  1242. LIST_ITEM (U"\\bu @@Dissimilarity & Configuration: Get stress (monotone mds)...@")
  1243. DEFINITION (U"choose stress-1 to obtain the value for the @stress according "
  1244. "to Kruskal.")
  1245. ENTRY (U"How to get started")
  1246. NORMAL (U"You can create an example @Dissimilarity object with the @@Create "
  1247. "letter R example...@ button which you can find under the "
  1248. "##Multidimensional scaling# option in the #New menu.")
  1249. MAN_END
  1250. MAN_BEGIN (U"MDS models", U"djmw", 20101109)
  1251. INTRO (U"Multidimensional scaling (MDS) models are defined by specifying "
  1252. "how given @Dissimilarity data, %\\de__%ij_, are "
  1253. "mapped into distances of an %m-dimensional MDS @Configuration %#X. "
  1254. "The mapping is specified by a %%representation function%, %f : "
  1255. "%\\de__%ij_ \\-> %d__%ij_(#X), which specifies how "
  1256. "dissimilarities should be related to the distances. The MDS analysis "
  1257. "tries to find the configuration (in a given dimensionality) whose "
  1258. "distances satisfy %f as closely as possible. "
  1259. "This closeness is quantified by a badness-of-fit measure which is often "
  1260. "called @stress.")
  1261. ENTRY (U"Representation functions")
  1262. NORMAL (U"In the application of MDS we try to find a configuration #X such that "
  1263. "the following relations are satisfied as well as possible:")
  1264. FORMULA (U"%f(%\\de__%ij_) \\~~ %d__%ij_(#X)")
  1265. NORMAL (U"The numbers that result from applying %f on %\\de__%ij_ are sometimes "
  1266. "called @disparities %d\\'p__%ij_. In most applications of MDS, besides "
  1267. "the configuration #X, also the function %f is not "
  1268. "completely specified, i.e., the exact parameters of %f are unknown and "
  1269. "must also be estimated during the analysis. If no particular %f can be "
  1270. "derived from a theoretical model, one often restricts %f to a particular "
  1271. "class of functions on the basis of the scale level of the dissimilarity "
  1272. "data. If the disparities are related to the proximities by a specific "
  1273. "parametric function we speak of %metric MDS otherwise we speak of "
  1274. "%ordinal or %%non-metric% MDS.")
  1275. LIST_ITEM (U"\\bu %absolute mds: %d\\'p__%ij_ = \\de__%ij_")
  1276. DEFINITION (U"No parameters need to be estimated.")
  1277. LIST_ITEM (U"\\bu %ratio mds: %d\\'p__%ij_ = %b \\.c \\de__%ij_,")
  1278. DEFINITION (U"where the value of %b can be estimated by a linear regression of "
  1279. "%d__%ij_ on %\\de__%ij_.")
  1280. LIST_ITEM (U"\\bu %interval mds: %d\\'p__%ij_ = %a + %b \\.c %\\de__%ij_,")
  1281. DEFINITION (U"where the values of %a and %b can be estimated by a linear "
  1282. "regression of %d__%ij_ on %\\de__%ij_.")
  1283. LIST_ITEM (U"\\bu %i-spline mds: %d\\'p__%ij_ = %i-spline(%\\de__%ij_),")
  1284. DEFINITION (U"where %i-spline(\\.c) is a smooth monotonically increasing "
  1285. "@spline curve. The conceptual idea is that it is not possible to map "
  1286. "all dissimilarities into disparities by one simple function.")
  1287. LIST_ITEM (U"\\bu %monotone mds: %d\\'p__%ij_ = %monotone(\\de__%ij_),")
  1288. DEFINITION (U"where %monotone(\\.c) is restricted to be a monotonic function "
  1289. "that preserves the order of the dissimilarities:")
  1290. FORMULA (U"if %\\de__%ij_ < %\\de__%kl_, then %d__%ij_(#X) < %d__%kl_(#X)")
  1291. DEFINITION (U"If %\\de__%ij_ = %\\de__%kl_ and no particular constraint is involved for %d__%ij_(#X) "
  1292. "and %d__%kl_(#X) this is referred to as the %%primary approach% to ties. The %%secondary "
  1293. "approach% to ties requires that if %\\de__%ij_ = %\\de__%kl_, then also %d__%ij_(#X) = %d__%kl_(#X).")
  1294. NORMAL (U"More information on all aspects of multidimensional scaling can be found in: "
  1295. "@@Borg & Groenen (1997)@ and @@Ramsay (1988)@.")
  1296. NORMAL (U"The most important object types used in Praat for MDS and the conversions between these types are "
  1297. "shown in the following figure.")
  1298. PICTURE (6, 6, drawMDSClassRelations)
  1299. MAN_END
  1300. MAN_BEGIN (U"Measurement levels", U"djmw", 20151014)
  1301. INTRO (U"According to the measurement theory of @@Stevens (1951)@, there are four measurement levels, namely "
  1302. "#Nominal, #Ordinal, #Interval and #Ratio. In the light of multidimensional scaling, the first "
  1303. "two levels, Nominal and Ordinal, are often called %non-%metric. The last two are %metric.")
  1304. MAN_END
  1305. MAN_BEGIN (U"Multidimensional scaling", U"djmw", 20140117)
  1306. INTRO (U"This tutorial describes how you can use P\\s{RAAT} to "
  1307. "perform ##M#ulti ##D#imensional ##S#caling (MDS) analysis.")
  1308. NORMAL (U"MDS helps us to represent %dissimilarities between objects as "
  1309. "%distances in a %%Euclidean space%. In effect, the more dissimilar two "
  1310. "objects are, the larger the distance between the objects in the Euclidean "
  1311. "space should be. The data types in P\\s{RAAT} that "
  1312. "incorporate these notions are @Dissimilarity, @Distance and "
  1313. "@Configuration.")
  1314. NORMAL (U"In essence, an MDS-analysis is performed when you select a "
  1315. "Dissimilarity object and choose one of the ##To Configuration (xxx)...# "
  1316. "commands to obtain a Configuration object. In the above, method (xxx) "
  1317. "represents on of the possible @@MDS models|multidimensional scaling "
  1318. "models@.")
  1319. ENTRY (U"MDS-analysis")
  1320. NORMAL (U"Let us first create a Dissimilarity object. You can for example "
  1321. "@@Dissimilarity|create a Dissimilarity object from a file@. Here we "
  1322. "will the use the Dissimilarity object from @@Create letter R example...|"
  1323. "the letter R example@. We have chosen the default value (32.5) for the "
  1324. "(uniform) noise range. Note that this may result in substantial "
  1325. "distortions between the dissimilarities and the distances.")
  1326. NORMAL (U"Now you can do the following, for example:")
  1327. NORMAL (U"Select the Dissimilarity and choose @@Dissimilarity: To Configuration "
  1328. "(monotone mds)...|To Configuration (monotone mds)...@, and you perform "
  1329. "a @@Kruskal analysis|kruskal@-like multidimensional scaling which "
  1330. "results in a new "
  1331. "Configuration object. (This Configuration could subsequently be used as "
  1332. "the starting Configuration for a new MDS-analysis!).")
  1333. NORMAL (U"Select the Configuration and choose @@Configuration: Draw...|Draw...@ "
  1334. "and the following picture might result.")
  1335. PICTURE (4.0, 4.0, drawLetterRConfigurationExample2)
  1336. NORMAL (U"The following script summarizes:")
  1337. CODE (U"dissimilarity = Create letter R example: 32.5")
  1338. CODE (U"configuration = To Configuration (monotone mds): 2, \"Primary approach\", 0.00001, 50, 1")
  1339. CODE (U"Draw: 1, 2, -0.8, 1.2, -0.8, 0.7, \"yes\"")
  1340. ENTRY (U"Obtaining the stress value")
  1341. NORMAL (U"Select the Dissimilarity and the Configuration together and query for "
  1342. "the @stress value with: "
  1343. "@@Dissimilarity & Configuration: Get stress (monotone mds)...|"
  1344. "Get stress (monotone mds)...@. ")
  1345. NORMAL (U"The following script summarizes:")
  1346. CODE (U"selectObject: dissimilarity, configuration")
  1347. CODE (U"Get stress (monotone mds): \"Primary approach\", \"Kruskals's "
  1348. "stress-1\"")
  1349. ENTRY (U"The Shepard diagram")
  1350. NORMAL (U"Select the Dissimilarity and the Configuration together to "
  1351. "@@Dissimilarity & Configuration: Draw Shepard diagram...|"
  1352. "draw the Shepard diagram@.")
  1353. PICTURE (4.0, 4.0, drawLetterRShepard)
  1354. NORMAL (U"The following script summarizes:")
  1355. CODE (U"selectObject: dissimilarity, configuration")
  1356. CODE (U"Draw Shepard diagram: 0, 200, 0, 2.2, 1, \"+\", \"yes\"")
  1357. ENTRY (U"The (monotone) regression")
  1358. NORMAL (U"Select the Dissimilarity and the Configuration together to "
  1359. "@@Dissimilarity & Configuration: Draw regression (monotone mds)...|"
  1360. "draw the monotone regression@ of distances on dissimilarities.")
  1361. PICTURE (4.0, 4.0, drawLetterRRegression)
  1362. NORMAL (U"The following script summarizes:")
  1363. CODE (U"selectObject: dissimilarity, configuration")
  1364. CODE (U"Draw monotone regresion: \"Primary approach\", 0, 200, 0, 2.2, 1, \"+\", \"yes\"")
  1365. NORMAL (U"When you enter %noiseRange = 0 in the form for the letter #R, perfect "
  1366. "reconstruction is possible. The Shepard diagram then will show "
  1367. "a perfectly smooth monotonically increasing function.")
  1368. ENTRY (U"Weighing the dissimilarities")
  1369. NORMAL (U"When you can't have equal confidence in all the number in the "
  1370. "Dissimilarity object, you can give different weights to these numbers by "
  1371. "associating a @Weight object with the Dissimilarity object. "
  1372. "An easy way to do this is to select the Dissimilarity object and first "
  1373. "choose @@Dissimilarity: To Weight|To Weight@. Then you might change the "
  1374. "individual weights in the Weight object with the @@TableOfReal: Set "
  1375. "value...| Set value...@ command (remember: make %w__%ij_ = %w__%ji_).")
  1376. NORMAL (U"The following script summarizes:")
  1377. CODE (U"selectObject: dissimilarity")
  1378. CODE (U"weight = To Weight")
  1379. CODE (U"! Change [i][j] and [j][i] cells in the Weight object")
  1380. CODE (U"Set value: i, j, val")
  1381. CODE (U"Set value: j, i, val")
  1382. CODE (U"...")
  1383. CODE (U"! now we can do a weighed analysis.")
  1384. CODE (U"selectObject: dissimilarity, weight")
  1385. CODE (U"To Configuration (monotone mds): 2, \"Primary approach\", 0.00001, 50, 1)")
  1386. NORMAL (U"You can also query the @stress values with three objects selected. "
  1387. "The following script summarizes:")
  1388. CODE (U"selectObject: dissimilarity, weight, configuration")
  1389. CODE (U"Get stress (monotone mds): \"Primary approach\", \"Kruskals's stress-1\"")
  1390. ENTRY (U"Using a start Configuration")
  1391. NORMAL (U"You could also use a Configuration object as a starting "
  1392. "configuration in the minimization process. "
  1393. "Let's assume that you are not satisfied with the stress value from the "
  1394. "Configuration object that you obtained in the previous analysis. "
  1395. "You can than use this Configuration object as a "
  1396. "starting point for further analysis:")
  1397. NORMAL (U"The following script summarizes:")
  1398. CODE (U"selectObject: dissimilarity, configuration, weight")
  1399. CODE (U"To Configuration (monotone mds): 2, \"Primary approach\", 0.00001, 50, 1")
  1400. ENTRY (U"Multiple Dissimilarity's (INDSCAL)")
  1401. NORMAL (U"When you have multiple Dissimilarity objects you can also perform "
  1402. "@@individual difference scaling@ (often called @@INDSCAL analysis@). ")
  1403. NORMAL (U"As an example we can use an @@Create INDSCAL Carroll & Wish "
  1404. "example...| example taken from Carrol & Wish@. "
  1405. "Because INDSCAL only works on metrical data, we cannot use Dissimilarity "
  1406. "objects directly. We have to transform them first @@Dissimilarity: To "
  1407. "Distance...|to Distance@ objects.")
  1408. NORMAL (U"This type of analysis on multiple objects results in two new objects: "
  1409. "a Configuration and a @Salience.")
  1410. MAN_END
  1411. MAN_BEGIN (U"Procrustes", U"djmw", 20010927)
  1412. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1413. NORMAL (U"An object of type Procrustes represents the special @@AffineTransform|"
  1414. "affine transform@ that consists of a "
  1415. "combination of a translation, a shape preserving transformation and a scaling (this scaling is often called %dilation). "
  1416. "Because the transformation has to be shape preserving, only a combination of a rotation and a reflection is allowed. "
  1417. "A configuration matrix #%X is transformed in the following way to a new configuration matrix #%Y: ")
  1418. FORMULA (U"#%Y = %s #%X #%T+ #1#%t',")
  1419. NORMAL (U"where %s is the scaling factor, #%T is the shape preserving transformation matrix, #%t is the translation vector, "
  1420. "and #1 is the vector with only ones as its elements.")
  1421. NORMAL (U"For more information about the Procrustes transform and its algorithm "
  1422. "see chapter 19 in @@Borg & Groenen (1997)@.")
  1423. MAN_END
  1424. MAN_BEGIN (U"Procrustes transform", U"djmw", 19980119)
  1425. INTRO (U"A transformation that only uses a combination of a translation, "
  1426. "a scaling and a rigid transformation to transform one Configuration such that it "
  1427. "matches as closely as possible another Configuration. ")
  1428. NORMAL (U"We speak of %%orthogonal Procrustes transform% when only the rigid "
  1429. "transformation is allowed but no scaling or translation.")
  1430. NORMAL (U"For more information about the Procrustes transform and its algorithm "
  1431. "see chapter 19 in @@Borg & Groenen (1997)@.")
  1432. MAN_END
  1433. MAN_BEGIN (U"Proximity", U"djmw", 19961008)
  1434. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1435. NORMAL (U"An object of type #Proximity represents proximities between objects.")
  1436. ENTRY (U"Inside a Proximity")
  1437. NORMAL (U"With @Inspect you will see the following attributes:")
  1438. TAG (U"%numberOfRows, %numberOfColumns")
  1439. DEFINITION (U"the number of objects (%numberOfRows and %numberOfColumns are "
  1440. "equal and \\>_1).")
  1441. TAG (U"%rowLabels, %columnLabels")
  1442. DEFINITION (U"the names associated with the objects (%rowLabels and "
  1443. "%columnLabels are equal.")
  1444. TAG (U"%data [1..%numberOfRows][1..%numberOfColumns]")
  1445. DEFINITION (U"the proximities between the objects.")
  1446. MAN_END
  1447. MAN_BEGIN (U"Salience", U"djmw", 19980112)
  1448. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1449. NORMAL (U"Elements %s__%ij_ in the "
  1450. "Salience matrix represent the importance of dimension %j (in the "
  1451. "@Configuration) for data source %i.")
  1452. ENTRY (U"Commands")
  1453. NORMAL (U"Creation, as a by-product of:")
  1454. LIST_ITEM (U"\\bu @@Distance: To Configuration (indscal)...")
  1455. LIST_ITEM (U"\\bu @@Distance: To Configuration (ytl)...")
  1456. MAN_END
  1457. MAN_BEGIN (U"ScalarProduct", U"djmw", 19980125)
  1458. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1459. NORMAL (U"An object of type ScalarProduct represents scalar products %b__%ij_ "
  1460. "between objects %i and %j in a metrical space.")
  1461. FORMULA (U"%b__%ij_ = \\su__%k=1..%numberOfDimensions_ %x__%ik_%x__%jk_,")
  1462. NORMAL (U"where %x__%ik_ and %x__%jk_ are the coordinates of the %k-th "
  1463. "dimension of points %i and %j, respectively. From this definition one "
  1464. "can see that scalar products, in contrast to distances, "
  1465. "do change when the origin is shifted.")
  1466. NORMAL (U"Creation")
  1467. LIST_ITEM (U"\\bu @@Distance: To ScalarProduct...@")
  1468. MAN_END
  1469. MAN_BEGIN (U"Similarity", U"djmw", 19961008)
  1470. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1471. NORMAL (U"An object of type Similarity represent a one-way "
  1472. "table of similarities between \"objects\".")
  1473. ENTRY (U"Commands")
  1474. NORMAL (U"Creation")
  1475. LIST_ITEM (U"\\bu @@Confusion: To Similarity...")
  1476. NORMAL (U"Drawing")
  1477. LIST_ITEM (U"\\bu ##Draw as numbers...")
  1478. LIST_ITEM (U"\\bu ##Draw as squares...")
  1479. NORMAL (U"Query")
  1480. LIST_ITEM (U"\\bu ##Get column mean (index)...")
  1481. LIST_ITEM (U"\\bu ##Get column mean (label)...")
  1482. LIST_ITEM (U"\\bu ##Get column stdev (index)...")
  1483. LIST_ITEM (U"\\bu ##Get column stdev (label)...")
  1484. NORMAL (U"Modification")
  1485. LIST_ITEM (U"\\bu ##Formula...")
  1486. LIST_ITEM (U"\\bu ##Remove column (index)...")
  1487. LIST_ITEM (U"\\bu ##Insert column (index)...")
  1488. LIST_ITEM (U"\\bu ##Set row label (index)...")
  1489. LIST_ITEM (U"\\bu ##Set row label (label)...")
  1490. LIST_ITEM (U"\\bu ##Set column label (index)...")
  1491. LIST_ITEM (U"\\bu ##Set column label (label)...")
  1492. NORMAL (U"Analysis")
  1493. LIST_ITEM (U"\\bu @@Similarity: To Dissimilarity...")
  1494. MAN_END
  1495. MAN_BEGIN (U"Similarity: To Dissimilarity...", U"djmw", 20040407)
  1496. INTRO (U"A command that creates a @Dissimilarity from every selected "
  1497. "@Similarity.")
  1498. ENTRY (U"Setting")
  1499. TAG (U"##Maximum dissimilarity")
  1500. DEFINITION (U"determines the maximum dissimilarity possible. When the default "
  1501. "value, 0.0, is chchosen%maximumDissimilarity "
  1502. "is calculated as the maximum element in the Similarity object.")
  1503. ENTRY (U"Algorithm")
  1504. NORMAL (U"To obtain dissimilarities we 'reverse' similarities:")
  1505. FORMULA (U"%%dissimilarity__%ij_ = %maximumDissimilarity \\-- %similarity__%ij_")
  1506. NORMAL (U"In this way the order of dissimilarities is the reverse of the order "
  1507. "of the similarities.")
  1508. MAN_END
  1509. MAN_BEGIN (U"smacof", U"djmw", 19980119)
  1510. INTRO (U"Scaling by Majorizing a Complicated Function, the iterative algorithm "
  1511. "to find an optimal Configuration.")
  1512. LIST_ITEM (U"1. Initialize")
  1513. LIST_ITEM (U" 1.a. Get initial Configuration #Z")
  1514. LIST_ITEM (U" 1.b. Set stress %\\si__%n_^^[0]^ to a very large value.")
  1515. LIST_ITEM (U" 1.c. Set iteration counter %k = 0")
  1516. LIST_ITEM (U"2. Increase iteration counter by one: %k = %k + 1")
  1517. LIST_ITEM (U"3. Calculate distances %d__%ij_(#Z).")
  1518. LIST_ITEM (U"4. Transform dissimilarities %\\de__%ij_ into disparities "
  1519. "%d\\'p__%ij_.")
  1520. LIST_ITEM (U"5. Standardize the disparities so that %\\et__%d\\'p_^2 = "
  1521. "%n(%n\\--1)/2.")
  1522. LIST_ITEM (U"6. Compute the Guttman transform #X^^[%k]^ of #Z.")
  1523. LIST_ITEM (U"7. Compute new distances %d__%ij_(#X^^[%k]^).")
  1524. LIST_ITEM (U"8. Compute normalized stress %\\si__%n_ (#d\\'p, #X^^[%k]^)")
  1525. LIST_ITEM (U"9. If |%\\si__%n_^^[%k]^ \\-- %\\si__%n_^^[%k\\--1]^| / %\\si__%n_"
  1526. "^^[%k\\--1]^ < %\\ep or %k > %maximumNumberOfIterations, then stop")
  1527. LIST_ITEM (U"10. Set #Z = #X^^[%k]^, and go to 2.")
  1528. NORMAL (U"This algorithm goes back to @@De Leeuw (1977)@.")
  1529. MAN_END
  1530. MAN_BEGIN (U"spline", U"djmw", 20121101)
  1531. INTRO (U"A spline function %f is a piecewise polynomial function defined on "
  1532. "an interval [%x__%min_, %x__%max_] "
  1533. "with specified continuity constraints, i.e., when the interval [%x__%min_,"
  1534. " %x__%max_] is subdivided by points %\\xi__%i_ such that %x__%min_ = "
  1535. "%\\xi__%1_ < ... < %\\xi__%q_ = %%x__%max_, then within each subinterval "
  1536. "[%\\xi__%j_, %\\xi__%j+1_) the function is a polynomial %P__%j_ of "
  1537. "specified degree %k.")
  1538. NORMAL (U"A %%knot sequence% %t = {%t__1_, ..., %t__%n+%k_}, where %n is the "
  1539. "number of free parameters that specify the spline function, is derived "
  1540. "from the %\\xi__%i_ by placing knots at the boundary values %\\xi__%i_ "
  1541. "according to the order of continuity at that boundary. The most common "
  1542. "continuity characteristics imposed on %f request that for adjacent "
  1543. "polynomials the derivatives up to order %k\\--2 match. For example, "
  1544. "the knot sequence of a spline of order %k for a partition of [%x__%min_,"
  1545. " %%x__%max_] into three intervals (%q = 4) will be %t__1_ = ... = "
  1546. "%t__%k_ = %x__%min_ (=%\\xi__1_), %t__%k+1_ = %\\xi__2_, %t__%k+2_ = "
  1547. "%\\xi__3_ , %t__%k+3_ = ... = %t__%k+%k+2_ = %x__%max_ (= %\\xi__4_). "
  1548. "This is called a %simple knot sequence, because all interior knots are "
  1549. "simple. The number of free parameters %n for this case obeys a simple "
  1550. "formula:")
  1551. FORMULA (U"%n = %numberOfInteriorKnots + %order.")
  1552. NORMAL (U"With suitable basis functions, for example, the M-spline family "
  1553. "%M__%i_(%x|%k, %t), %i=1..%n, we can write any spline %f in the form:")
  1554. FORMULA (U"%f = \\su__%i=1..%n_ %a__%i_%M__%i_,")
  1555. NORMAL (U"where the %M__%i_ are defined by the following recursive formula's:")
  1556. FORMULA (U"%M__%i_(%x|1,%t) = 1 / (%t__%i+1_ \\-- %t__%i_), %t__%i_ "
  1557. "\\<_ %x < %t__%i+1_, 0 otherwise")
  1558. FORMULA (U"%M__%i_(%x|%k,%t) = %k [(%x\\--%t__%i_)%M__%i_(%x|%k\\--1,%t) + "
  1559. "(%t__%i+%k_\\--%x)%M__%i+1_(%x|%k\\--1,%t)] / "
  1560. "((%k\\--1)(%t__%i+%k_\\--%t__%i_))")
  1561. NORMAL (U"These %M__%i_ are localized because %M__%i_(%x|%k,%t) > 0 only when "
  1562. "%t__%i_ \\<_ %x < %t__%i+%k_ and zero otherwise. Also, we have \\in"
  1563. " M__%i_(%x)%dx = 1. Because of this localization a change in coefficient "
  1564. "%a__%i_ will only effect %f within this interval.")
  1565. NORMAL (U"The following picture shows an M-spline of order 3 on the interval "
  1566. "[0, 1], with three interior knots at 0.3, 0.5 and 0.6.")
  1567. PICTURE (5.0, 5.0, drawMsplineExample)
  1568. NORMAL (U"Because the M-splines are nonnegative, %monotone splines% can be "
  1569. "derived from them by %integration:")
  1570. FORMULA (U"%I__%i_(%x|%k,%t) = \\in__%xmin_^%x %M__%i_(%u|%k,%t) %du")
  1571. NORMAL (U"Because each %M__%i_(%x|%k, %t) is a piecewise polynomial of degree"
  1572. " %k\\--1, each %I__%i_ will be of degree %k. Now we can write:")
  1573. FORMULA (U"%f = \\su__%i=1..%n_ %b__%i_%I__%i_(%x|%k,%t)")
  1574. NORMAL (U"We can use an M-spline of order %k+1 with a simple knot sequence %t, "
  1575. "for which %t__%j_ \\<_ x < %t__%j+1_, to put "
  1576. "the I-spline of order %k into a more convenient form:")
  1577. FORMULA (U"%I__%i_(%x|%k,%t) = 0, %i > %j")
  1578. FORMULA (U"%I__%i_(%x|%k,%t) = \\su__%m=%i+1..%j_ (%t__%m+%k+1_\\--"
  1579. "%t__%m_)%M__%m_(%x|%k+1,%t)/(%k+1), %j\\--%k \\<_ %i \\<_ %j")
  1580. FORMULA (U"%I__%i_(%x|%k,%t) = 1, %i < %j\\--%k")
  1581. NORMAL (U"The following figure shows the I-splines that were derived from "
  1582. "the M-splines above.")
  1583. PICTURE (5.0, 5.0, drawIsplineExample)
  1584. NORMAL (U"These spline formula's were taken from @@Ramsay (1988)@ and the "
  1585. "errors in his I-spline formulas were corrected.")
  1586. MAN_END
  1587. MAN_BEGIN (U"stress", U"djmw", 19980108)
  1588. INTRO (U"A badness-of-fit measure for the entire MDS representation.")
  1589. NORMAL (U"Several measures exist.")
  1590. ENTRY (U"Raw stress")
  1591. FORMULA (U"%\\si__%r_ (#d\\'p, #X) = \\su__%i<%j_ %w__%ij_(%d\\'p__%ij_ \\-- "
  1592. "%d__%ij_(#X))^2")
  1593. FORMULA (U"= \\su__%i<%j_ %w__%ij_%d\\'p__%ij_^2 + \\su__%i<%j_ "
  1594. "%w__%ij_%d__%ij_^2(#X) \\-- "
  1595. "2 \\su__%i<%j_ %w__%ij_%d\\'p__%ij_%d__%ij_(#X)")
  1596. FORMULA (U"= %\\et__%d\\'p_^2 + %\\et^2(#X) \\-- 2%\\ro(#d\\'p, #X)")
  1597. NORMAL (U"where the %d\\'p__%ij_ are the @disparities that are the result "
  1598. "from the transformation of the dissimilarities, i.e., %f(%\\de__%ij_). "
  1599. "Raw stress can be misleading because it is dependent on the normalization "
  1600. "of the disparities. The following measure tries to circumvent this "
  1601. "inconvenience.")
  1602. ENTRY (U"Normalized stress")
  1603. FORMULA (U"%\\si__%n_ = \\si__%r_ / %\\et__%d\\'p_^2")
  1604. NORMAL (U"This is the stress function that we minimize by iterative "
  1605. "majorization. It goes back to @@De Leeuw (1977)@.")
  1606. ENTRY (U"Kruskal's stress-1")
  1607. FORMULA (U"%\\si__1_ = \\Vr (\\su__%i<%j_ %w__%ij_(%d\\'p__%ij_ \\-- "
  1608. "%d__%ij_(#X))^2 / \\su__%i<%j_ %w__%ij_%d__%ij_^2(#X))^^1/2^")
  1609. NORMAL (U"In this measure, which is due to @@Kruskal (1964)@, stress is "
  1610. "expressed in relation to the size of #X.")
  1611. ENTRY (U"Kruskal's stress-2")
  1612. FORMULA (U"%\\si__2_ = \\Vr (\\su__%i<%j_ %w__%ij_(%d\\'p__%ij_ \\-- "
  1613. "%d__%ij_(#X))^2 / \\su__%i<%j_ %w__%ij_(%d__%ij_(#X) - "
  1614. "%averageDistance)^2)^^1/2^.")
  1615. NORMAL (U"In general, this measure results in a stress value that is "
  1616. "approximately twice the value for stress-1.")
  1617. ENTRY (U"Relation between %\\si__1_ and %\\si__n_")
  1618. NORMAL (U"When we have calculated %\\si__%n_ for Configuration #X, "
  1619. "disparities #d\\'p and Weight #W we cannot "
  1620. "directly use #X, #d\\'p and #W to calculate %\\si__1_ because the "
  1621. "scale of #X is not necessarily optimal "
  1622. "for %\\si__1_. We allow therefore a scale factor %b > 0 and "
  1623. "try to calculate %\\si__1_ (#d\\'p, %b #X). We minimize the resulting "
  1624. "expression for %b and substitute "
  1625. "the result back into the formula for stress, i.e.,")
  1626. FORMULA (U"%\\si__1_^2 (#d\\'p, %b #X) = (%\\et__%d\\'p_^2 + %b^2 %\\et^2(#X) "
  1627. "\\-- 2 %b %\\ro(#d\\'p, #X)) / %b^2 %\\et^2(#X)")
  1628. FORMULA (U"d%\\si__1_^2 (%b) / d%b == 0, gives")
  1629. FORMULA (U"%b = %\\et__%d\\'p_^2 / %\\ro")
  1630. FORMULA (U"%\\si__1_^2 = (1 - %\\ro^2 / (%\\et__%d\\'p_^2\\.c%\\et^2(#X)))")
  1631. NORMAL (U"This means that %\\si__1_ = \\Vr %\\si__%n_.")
  1632. ENTRY (U"Relation between %\\si__2_ and %\\si__n_")
  1633. NORMAL (U"We can do the same trick as before for %\\si__2_:")
  1634. FORMULA (U"%\\si__2_^2 (#d\\'p, %b #X) = (%\\et__%d\\'p_^2 + %b^2 %\\et^2(#X) "
  1635. "\\-- 2 %b %\\ro(#d\\'p, #X)) / "
  1636. "(%b^2 \\su__%i<%j_ %w__%ij_(%d__%ij_(#X) - %averageDistance)^2)")
  1637. NORMAL (U"From which we derive:")
  1638. FORMULA (U"%\\si__2_ = \\Vr ((%\\et__%d\\'p_^2 \\.c %\\et^2(#X) - "
  1639. "%\\ro^2(#d\\'p, #X)) / (%\\et__%d\\'p_^2 \\.c \\su__%i<%j_ "
  1640. "%w__%ij_(%d__%ij_(#X) - %averageDistance)^2))")
  1641. MAN_END
  1642. MAN_BEGIN (U"TableOfReal: Centre columns", U"djmw", 19980422)
  1643. INTRO (U"A command that centres the columns in the selected @TableOfReal "
  1644. "objects.")
  1645. ENTRY (U"Algorithm")
  1646. NORMAL (U"The new values in the table, %x\\'p__%ij_, will be:")
  1647. FORMULA (U"%x\\'p__%ij_ = %x__%ij_ \\-- %x__\\.c%j_,")
  1648. NORMAL (U"where")
  1649. FORMULA (U"%x__\\.c%j_ = \\su__%i=1..%numberOfRows_ %x__%ij_ / %numberOfRows,")
  1650. NORMAL (U"the average of column %j.")
  1651. MAN_END
  1652. MAN_BEGIN (U"TableOfReal: Centre rows", U"djmw", 19980422)
  1653. INTRO (U"A command that centres the rows in the selected @TableOfReal objects.")
  1654. ENTRY (U"Algorithm")
  1655. NORMAL (U"The new values in the table, %x\\'p__%ij_, will be:")
  1656. FORMULA (U"%x\\'p__%ij_ = %x__%ij_ \\-- %x__%i\\.c_,")
  1657. NORMAL (U"where")
  1658. FORMULA (U"%x__%i\\.c_ = \\su__%j=1..%numberOfColumns_ %x__%ij_ / "
  1659. "%numberOfColumns,")
  1660. NORMAL (U"the average of row %i.")
  1661. MAN_END
  1662. MAN_BEGIN (U"TableOfReal: Get table norm", U"djmw", 19980422)
  1663. INTRO (U"A command that returns the norm of the selected @TableOfReal object.")
  1664. ENTRY (U"Algorithm")
  1665. NORMAL (U"Returns: sqrt (\\su__%i=1..%numberOfRows_ \\su__%j=1..%numberOfColumns"
  1666. "_ %x__%ij_^2).")
  1667. MAN_END
  1668. MAN_BEGIN (U"TableOfReal: Normalize columns...", U"djmw", 19980422)
  1669. INTRO (U"A command that normalizes the columns in the selected @TableOfReal "
  1670. "objects.")
  1671. ENTRY (U"Setting")
  1672. TAG (U"##Norm")
  1673. DEFINITION (U"determines the sum of the squared elements in each column after "
  1674. "normalization.")
  1675. ENTRY (U"Algorithm")
  1676. NORMAL (U"All elements %x__%ij_ in each column %j=1..%numberOfColumns will be "
  1677. "multiplied by sqrt (%norm / \\su__%i=1..%numberOfRows_ %x__%ij_^2).")
  1678. MAN_END
  1679. MAN_BEGIN (U"TableOfReal: Normalize rows...", U"djmw", 19980422)
  1680. INTRO (U"A command that normalizes the rows in the selected @TableOfReal "
  1681. "objects.")
  1682. ENTRY (U"Setting")
  1683. TAG (U"##Norm")
  1684. DEFINITION (U"determines the sum of the squared elements in each row after "
  1685. "normalization.")
  1686. ENTRY (U"Algorithm")
  1687. NORMAL (U"All elements %x__%ij_ in each row %i=1..%numberOfRows will be "
  1688. "multiplied by sqrt (%norm / \\su__%j=1..%numberOfColumns_ %x__%ij_^2).")
  1689. MAN_END
  1690. MAN_BEGIN (U"TableOfReal: Normalize table...", U"djmw", 19980422)
  1691. INTRO (U"A command that normalizes the elements in the selected @TableOfReal "
  1692. "objects.")
  1693. ENTRY (U"Setting")
  1694. TAG (U"##Norm")
  1695. DEFINITION (U"determines the sum of the squared elements after normalization.")
  1696. ENTRY (U"Algorithm")
  1697. NORMAL (U"All elements %x__%ij_ will be multiplied by "
  1698. "sqrt (%norm / \\su__%i=1..%numberOfRows_ \\su__%j=1..%numberOfColumns_"
  1699. " %x__%ij_^2.")
  1700. MAN_END
  1701. MAN_BEGIN (U"Weight", U"djmw", 19980108)
  1702. INTRO (U"One of the @@types of objects@ in P\\s{RAAT}.")
  1703. NORMAL (U"An object of type Weight represents a matrix "
  1704. "with weights %w__%ij_.")
  1705. NORMAL (U"An object of type Weight selected together with an onject of type"
  1706. " @Dissimilarity can be used to make distinctions in the importance of the"
  1707. " contribution of each individual dissimilarity %\\de__%ij_ to "
  1708. "@stress and therefore to the final configuration. Weights can be "
  1709. "used for instance to code for missing values, i.e., take %w__%ij_ = 0 if "
  1710. "dissimilarity %\\de__%ij_ is missing and %w__%ij_ = 1 if %\\de__%ij_ is"
  1711. " known.")
  1712. ENTRY (U"Commands")
  1713. NORMAL (U"Creation")
  1714. LIST_ITEM (U"\\bu @@Dissimilarity: To Weight")
  1715. NORMAL (U"Analysis")
  1716. NORMAL (U"See @@Dissimilarity & Weight: To Configuration...@ for help on the "
  1717. "following analysis items: ")
  1718. LIST_ITEM (U"\\bu ##Dissimilarity & Weight: To Configuration (monotone mds)...")
  1719. LIST_ITEM (U"\\bu ##Dissimilarity & Weight: To Configuration (i-spline mds)...")
  1720. LIST_ITEM (U"\\bu ##Dissimilarity & Weight: To Configuration (interval mds)...")
  1721. LIST_ITEM (U"\\bu ##Dissimilarity & Weight: To Configuration (ratio mds)...")
  1722. LIST_ITEM (U"\\bu ##Dissimilarity & Weight: To Configuration (absolute mds)...")
  1723. NORMAL (U"Query")
  1724. NORMAL (U"See @@Dissimilarity & Configuration & Weight: Get stress...@ for help "
  1725. "on the following query items: ")
  1726. LIST_ITEM (U"\\bu ##Dissimilarity & Configuration & Weight: Get stress "
  1727. "(monotone mds)...")
  1728. LIST_ITEM (U"\\bu ##Dissimilarity & Configuration & Weight: Get stress "
  1729. "(i-spline mds)...")
  1730. LIST_ITEM (U"\\bu ##Dissimilarity & Configuration & Weight: Get stress "
  1731. "(interval mds)...")
  1732. LIST_ITEM (U"\\bu ##Dissimilarity & Configuration & Weight: Get stress "
  1733. "(ratio mds)...")
  1734. LIST_ITEM (U"\\bu ##Dissimilarity & Configuration & Weight: Get stress "
  1735. "(absolute mds)...")
  1736. MAN_END
  1737. /************ references ***********************************************/
  1738. MAN_BEGIN (U"Abramowitz & Stegun (1970)", U"djmw", 19971201)
  1739. NORMAL (U"M. Abramowitz & I. Stegun (1970): %%Handbook of mathematical "
  1740. "functions%. New York: Dover Publications.")
  1741. MAN_END
  1742. MAN_BEGIN (U"Borg & Groenen (1997)", U"djmw", 19971219)
  1743. NORMAL (U"I. Borg & P. Groenen (1997): %%Modern multidimensional scaling: "
  1744. "theory and applications%. Springer.")
  1745. MAN_END
  1746. MAN_BEGIN (U"Brokken (1983)", U"djmw", 19980406)
  1747. NORMAL (U" F.B. Brokken (1983): \"Orthogonal Procrustes rotation maximizing "
  1748. "congruence.\" %Psychometrika #48: 343\\--352.")
  1749. MAN_END
  1750. MAN_BEGIN (U"Cailliez (1983)", U"djmw", 19971201)
  1751. NORMAL (U" F. Cailliez (1983): \"The analytical solution of the additive "
  1752. "constant problem.\" %Psychometrika #48, 305-308.")
  1753. MAN_END
  1754. MAN_BEGIN (U"Carroll & Chang (1970)", U"djmw", 19971201)
  1755. NORMAL (U"J.D. Carroll & J.-J. Chang, (1970): \"Analysis of Individual "
  1756. "Differences in Multidimensional scaling via an N-way generalization of "
  1757. "\"Eckart-Young\" Decomposition.\" %Psychometrika #35: 283\\--319.")
  1758. MAN_END
  1759. MAN_BEGIN (U"Carroll & Wish (1974)", U"djmw", 19971201)
  1760. NORMAL (U"J.D. Carroll & M. Wish, (1974): \"Models and methods for three-way "
  1761. "multidimensional scaling.\" In D.H. Krantz, R.C. Atkinson, R.D. Luce & "
  1762. "P. Suppes (eds.): %%Contemporary developments in mathematical psychology: "
  1763. "Vol. 2 Measurement, psychophysics, and neural "
  1764. "information processing%, 283\\--319. New York: Academic Press.")
  1765. MAN_END
  1766. MAN_BEGIN (U"De Leeuw (1977)", U"djmw", 19971201)
  1767. NORMAL (U"J. de Leeuw (1977): \"Applications of convex analysis to "
  1768. "multidimensional scaling.\" In J.R. Barra, F. Brodeau, G. Romier & "
  1769. "B. van Cutsem (eds.): %%Recent developments in statistics%. Amsterdam: "
  1770. "North-Holland. 133\\--145.")
  1771. MAN_END
  1772. MAN_BEGIN (U"De Leeuw & Pruzansky (1978)", U"djmw", 19971201)
  1773. NORMAL (U"J. de Leeuw & S. Pruzansky (1978): \"A new computational method to "
  1774. "fit the weighted Euclidean distance model.\" %Psychometrika #43: 479\\--490.")
  1775. MAN_END
  1776. MAN_BEGIN (U"Gifi (1990)", U"djmw", 19971207)
  1777. NORMAL (U"A. Gifi (1990): %%Nonlinear multivariate analysis%. John Wiley & "
  1778. "Sons Ltd., reprint 1996.")
  1779. MAN_END
  1780. MAN_BEGIN (U"Golub & van Loan (1996)", U"djmw", 19971207)
  1781. NORMAL (U"G. Golub & C. van Loan (1996): %%Matrix computations%. Third edition. "
  1782. "London: The Johns Hopkins University Press.") // ??
  1783. MAN_END
  1784. MAN_BEGIN (U"Green, Carmone & Smith (1989)", U"djmw", 19971201)
  1785. NORMAL (U"P. Green, F. Carmone, S. Smith (1989): "
  1786. "%%Multidimensional scaling: concepts and applications%. Section 3. Allyn and Bacon.")
  1787. MAN_END
  1788. MAN_BEGIN (U"Kaiser (1958)", U"djmw", 19980404)
  1789. NORMAL (U" H.F. Kaiser (1958): \"The varimax criterion for analytic rotation "
  1790. "in factor analysis.\" %Psychometrika #23: 187\\--200.")
  1791. MAN_END
  1792. MAN_BEGIN (U"Kiers & Groenen (1996)", U"djmw", 19971219)
  1793. NORMAL (U"H.A.L. Kiers & P. Groenen (1996): \"A monotonically convergent "
  1794. "algorithm for orthogonal congruence rotation.\" %Psychometrika #61: "
  1795. "375\\--389.")
  1796. MAN_END
  1797. MAN_BEGIN (U"Klein, Plomp & Pols (1970)", U"djmw", 19971201)
  1798. NORMAL (U" W. Klein, R. Plomp, & L.C.W. Pols (1970): \"Vowel Spectra, "
  1799. "Vowel Spaces, and Vowel Identification.\" %%Journal of the Acoustical Society of America% #48: 999\\--1009.")
  1800. MAN_END
  1801. MAN_BEGIN (U"Kruskal (1964)", U"djmw", 19971201)
  1802. NORMAL (U"J.B. Kruskal (1964): \"Nonmetric multidimensional scaling: a "
  1803. "numerical method.\" %Psychometrika #29: 115\\--129.")
  1804. MAN_END
  1805. MAN_BEGIN (U"Ramsay (1988)", U"djmw", 19980106)
  1806. NORMAL (U"J.O. Ramsay (1988): \"Monotone regression splines in action.\" "
  1807. "%%Statistical Science% #3: 425\\--461.")
  1808. MAN_END
  1809. MAN_BEGIN (U"Stevens (1951)", U"djmw", 19971201)
  1810. NORMAL (U"S.S. Stevens (1951): \"Mathematics, measurement, and psychophysics.\" "
  1811. "In S.S. Stevens (ed.): %%Handbook of experimental psychology%. New York: "
  1812. "Wiley.")
  1813. MAN_END
  1814. MAN_BEGIN (U"Takane, Young & de Leeuw (1976)", U"djmw", 19971201)
  1815. NORMAL (U"Y. Takane, F. Young, J. de Leeuw (1976): \"Non-metric individual "
  1816. "differences multidimensional scaling: an alternating least squares method "
  1817. "with optimal scaling features.\" %Psychometrika #42: 7\\--67.")
  1818. MAN_END
  1819. MAN_BEGIN (U"Ten Berge (1995)", U"djmw", 19980404)
  1820. NORMAL (U"J.M.F. ten Berge (1995): \"Suppressing permutations or rigid planar "
  1821. "rotations: a remedy against nonoptimal varimax rotations.\" "
  1822. "%Psychometrika #60, 437\\--446.")
  1823. MAN_END
  1824. MAN_BEGIN (U"Ten Berge, Kiers & Krijnen (1993)", U"djmw", 19971207)
  1825. NORMAL (U"J.M.F. ten Berge, H.A.L. Kiers & W.P. Krijnen (1993): \"Computational "
  1826. "solutions for the problem of negative saliences and nonsymmetry in "
  1827. "INDSCAL.\" %%Journal of Classification% #10: 115\\--124.")
  1828. MAN_END
  1829. MAN_BEGIN (U"Torgerson (1958)", U"djmw", 19971201)
  1830. NORMAL (U"W.S. Torgerson (1958): %%Theory and methods of scaling%. New York: Wiley.")
  1831. MAN_END
  1832. MAN_BEGIN (U"Young, Takane & Lewyckyj (1978)", U"djmw", 19971201)
  1833. NORMAL (U"F.W. Young, Y. Takane & R. Lewyckyj (1978): "
  1834. "\"Three notes on ALSCAL.\" %Psychometrika #43: 433\\--435.")
  1835. MAN_END
  1836. MAN_BEGIN (U"Weller & Romney (1990)", U"djmw", 19971216)
  1837. NORMAL (U"S.C. Weller & A.K. Romney (1990): %%Metric Scaling: "
  1838. "correspondence analysis%. Sage University Paper Series on Quantitative "
  1839. "Applications in the Social Sciences 07-075. Newbury Park, CA: Sage.")
  1840. MAN_END
  1841. }
  1842. /* End of file manual_MDS.cpp */