| Title: | Dual Scaling Analysis of Data |
|---|---|
| Description: | Dual Scaling, developed by Professor Shizuhiko Nishisato (1994, ISBN: 0-9691785-3-6), is a fundamental technique in multivariate analysis used for data scaling and correspondence analysis. Its utility lies in its ability to represent multidimensional data in a lower-dimensional space, making it easier to visualize and understand underlying patterns in complex data. This technique has been implemented to handle various types of data, including Contingency and Frequency data (CF), Multiple-Choice data (MC), Sorting data (SO), Paired-Comparison data (PC), and Rank-Order data (RO), providing users with a powerful tool to explore relationships between variables and observations in various fields, from sociology to ecology, enabling deeper and more efficient analysis of multivariate datasets. |
| Authors: | Jose G. Clavel [aut] |
| Maintainer: | Roberto de la Banda <[email protected]> |
| License: | AGPL (>= 3) |
| Version: | 1.0.0 |
| Built: | 2026-06-05 09:26:06 UTC |
| Source: | https://github.com/cran/dualScale |
10 observation and 3 variables erroneously coded.
bad_codedbad_coded
A data set with 10 observations on the following 3 variables:
V2Option 1 is omited
V3Options go from 1 to 8
V4Option 1 omited, other are not consecutive and there is NA
The data were collected from 23 participants at a workshop in Singapore in 1985
Nishisato, S. and Baba, Y. (1999). On contingency, projection and forced classification of dual scaling. Behaviormetrika, 26, 207–219.
Nishisato, S. (2007). Multidimensional Nonlinear Descriptive Analysis. Chapman & Hall/CRC.
As a course assignment for Nishisato's class, Ian Wiggins, a student, collected paired comparison data from 14 researchers at a research institute on his eight Christmas party plans.
christmaschristmas
A subset of the original data set of 14 subjects on 15 pairs of 6 plans:
plan1A pub/restaurant crawl after work
plan2A reasonably priced lunch in an area restaurant
plan3Keep to one's self
plan4An evening banquet at a restaurant
plan5A pot-luck at someone's home after work
plan6A ritzy lunch at a good restaurant (tablecloths)
The data were originally collected from 14 participants by 28 pairs
of plans with elements 1 for the choice of the first plan and 2 for the
choice of the second plan. For computations, 2 is converted to -1.
Nishisato, S. and Nishisato, I.(1994). Dual Scaling in a Nutshell. Toronto: MicroStats.
Nishisato, S. (2022). Optimal Quantification and Symmetry. Behaviormetrika, 12, 137.
Hollingshead (1949) found that the members of a small Middle Western community in the United States divided themselves into 5 social classes. He investigated his prediction that adolescents in the different social classes would enroll in different curricula
curriculacurricula
A data set of 390 subjects on 5 social classes and 3 different curricula:
s.class1Merged social classes I and II because the frequencies were small
s.class2Social class III
s.class3Social class IV
s.class4Social class V
curricula1College Prep curriculum
curricula2General curriculum
curricula3Commercial curriculum
The data were originally collected from 390 participants in terms of their social classes and actual curriculum enrollments.
Nishisato, S. and Nishisato, I.(1994). Dual Scaling in a Nutshell. Toronto: MicroStats.
Hollingshead, A.B. (1949). Elmtown's Youth: The Impact of Social Classes on Adolescents. Wiley.
Contingency and frequency data analysis
ds_cf(input, solutions = NULL)ds_cf(input, solutions = NULL)
input |
A data set with valid data |
solutions |
Optional arguments. A number of intended solutions |
call |
Call with all of the specified arguments are specified by their full names |
orig_data |
Initial data |
item_op_lbl |
Item options labels |
sub_lbl |
Subjects options labels |
tot_row |
Sum of subject values |
tot_row |
Sum of item values |
solutions |
Maximum possible solutions |
out |
Results obtained |
norm_opt |
Normed option weights |
proj_opt |
Projected option weights |
norm_sub |
Normed subject scores |
proj_sub |
Projected subject scores |
appro0 |
Order 0 approximation for initial data |
approx |
Order |
residual0 |
Residual matrix for initial data |
residual |
Residual matrix |
ds_cf(curricula) ds_cf(preferences)ds_cf(curricula) ds_cf(preferences)
Multiple choice data analysis
ds_mc(input, solutions = NULL, mode = c("rad", "act"))ds_mc(input, solutions = NULL, mode = c("rad", "act"))
input |
A data set with valid data |
solutions |
Optional argument. A number of intended solutions |
mode |
Optional argument. In case of NA values, the action to be taken. See help("ds_mc_check") for more information. Radical action by default. |
call |
Call with all of the specified arguments are specified by their full names |
orig_data |
Initial data |
item_op_lbl |
Item options labels |
sub_lbl |
Subjects options labels |
solutions |
Maximum possible solutions |
out |
Results obtained |
item_stat |
Item statistics |
info |
Distribution of component |
rij |
Inter item correlation |
proj_opt |
Projected option weights |
proj_sub |
Projected subject scores |
norm_opt |
Normed option weights |
norm_sub |
Normed subject scores |
ds_mc(singaporean) ds_mc(singaporean, solutions = 2)ds_mc(singaporean) ds_mc(singaporean, solutions = 2)
Function to identify incorrect Multiple Choice input data
ds_mc_check(input, mode = c("rad", "act"))ds_mc_check(input, mode = c("rad", "act"))
input |
The input data to be checked |
mode |
Do you want to use a radical ("rad") correction mode or active ("act") allocations? |
A list with the original input and the converted input
ds_mc_check(singaporean) ds_mc_check(bad_coded)ds_mc_check(singaporean) ds_mc_check(bad_coded)
Forced multiple choice data analysis
ds_mcf(input, crit, solutions = NULL, mode = c("rad", "act"))ds_mcf(input, crit, solutions = NULL, mode = c("rad", "act"))
input |
A data set with valid data |
crit |
Used to determine a criterion item for forced classification analysis |
solutions |
Optional argument. A number of intended solutions |
mode |
Correction mode to incorrect data. |
There are three types of outputs: Forced classification of the criterion item (type A); dual scaling of non-criterion items by ignoring the criterion item (type B); dual scaling of non-criterion items after eliminating the influence of the criterion item (type C). These three types correspond to, respectively, dual scaling of data projected onto the subspace of the criterion item, dual scaling of non-criterion items, and dual scaling of data in the complementary space of the criterion item.
call |
Call with all of the specified arguments are specified by their full names |
orig_data |
Initial data |
crit_item |
The criterion item for forced classification |
item_op_lbl |
Item options labels |
sub_lbl |
Subjects options labels |
solutions_mcf |
Maximum possible solutions for forced multiple choice |
solutions_mc |
Maximum possible solutions for multiple choice |
info_\emph{x} |
Distribution of component information according to output |
out_\emph{x} |
Results obtained according to output |
item_stat_\emph{x} |
Item statistics according to output (Not type C) |
rij_\emph{x} |
Inter item correlation according to output (Not type C) |
proj_opt_\emph{x} |
Projected option weights according to output |
proj_sub_\emph{x} |
Projected subject scores according to output |
norm_opt_\emph{x} |
Normed option weights according to output |
norm_sub_\emph{x} |
Normed subject scores according to output |
match_missmatch |
Match-mismatch tables |
predict |
Percentage of correct classification |
comp_cont |
Component contamination |
tot_cont |
Total contamination |
ds_mcf(singaporean, crit = 1)ds_mcf(singaporean, crit = 1)
Paired comparison data analysis
ds_pc(input, solutions = NULL)ds_pc(input, solutions = NULL)
input |
A data set with valid data |
solutions |
Optional argument. A number of intended solutions |
call |
Call with all of the specified arguments are specified by their full names |
orig_data |
Initial data |
item_op_lbl |
Item options labels |
sub_lbl |
Subjects options labels |
solutions |
Maximum possible solutions |
out |
Results obtained |
mat_e |
Matrix E |
norm_opt |
Normed option weights |
proj_opt |
Projected option weights |
norm_sub |
Normed subject scores |
proj_sub |
Projected subject scores |
ds_pc(christmas)ds_pc(christmas)
Rank order data analysis
ds_ro(input, solutions = NULL)ds_ro(input, solutions = NULL)
input |
A data set with valid data |
solutions |
Optional argument. A number of intended solutions |
call |
Call with all of the specified arguments are specified by their full names |
orig_data |
Initial data |
item_op_lbl |
Item options labels |
sub_lbl |
Subjects options labels |
solutions |
Maximum possible solutions |
out |
Results obtained |
mat_e |
Matrix E |
norm_opt |
Normed option weights |
proj_opt |
Projected option weights |
norm_sub |
Normed subject scores |
proj_sub |
Projected subject scores |
out_rank |
Results obtained by rank analysis |
norm_opt_rank |
Normed option weights by rank analysis |
proj_opt_rank |
Projected option weights by rank analysis |
norm_rank |
Normed rank scores |
proj_rank |
Projected rank scores |
ds_ro(goverment)ds_ro(goverment)
A data set collected in Nishisato's scaling class (1982) in which 31 students on 10 municipal services in Toronto.
govermentgoverment
A subset of the original data of 10 subjects on 10 municipal services in Toronto:
APublic transit system
BPostal service
CMedical care, including hospitals and clinics
DSports, recreational facilities
EPolice protection
Fpublic libraries
Gcleaning streets
Hrestaurants
Itheatres
JOverall planning and development
The data were originally collected to ranked the "most satisfactory" service, the "second most satisfactory", and so on until the "least satisfactory".
Nishisato, S. and Nishisato, I.(1994). Dual Scaling in a Nutshell. Toronto: MicroStats.
Nishisato, S. and Nishisato, I.(1994). Dual Scaling in a Nutshell. Toronto: MicroStats.
Obtain the data used in the graphs
plot_data(x, dim1 = 1, dim2 = 2, type = c("Asy1", "Asy2", "Sub", "Ite"), ...)plot_data(x, dim1 = 1, dim2 = 2, type = c("Asy1", "Asy2", "Sub", "Ite"), ...)
x |
A Dual Scale object |
dim1 |
Component for the horizontal axis. Default dimension 1 |
dim2 |
Component for the vertical axis. Default dimension 2 |
type |
Graph type
|
... |
Arguments to be passed to methods |
A dataframe with the data used
plot_data(ds_cf(curricula)) plot_data(ds_mc(singaporean)) plot_data(ds_mcf(singaporean, crit = 1)) plot_data(ds_pc(christmas)) plot_data(ds_ro(goverment))plot_data(ds_cf(curricula)) plot_data(ds_mc(singaporean)) plot_data(ds_mcf(singaporean, crit = 1)) plot_data(ds_pc(christmas)) plot_data(ds_ro(goverment))
Plot of Dual Scale analysis
## S3 method for class 'dualScale' plot(x, dim1 = 1, dim2 = 2, type = c("Asy1", "Asy2", "Sub", "Ite"), ...)## S3 method for class 'dualScale' plot(x, dim1 = 1, dim2 = 2, type = c("Asy1", "Asy2", "Sub", "Ite"), ...)
x |
A Dual Scale object |
dim1 |
Component for the horizontal axis. Default dimension 1 |
dim2 |
Component for the vertical axis. Default dimension 2 |
type |
Graph type
|
... |
Arguments to be passed to methods |
A plot of the available information from the object
plot(ds_cf(curricula)) plot(ds_mc(singaporean)) plot(ds_mcf(singaporean, crit = 1)) plot(ds_pc(christmas)) plot(ds_ro(goverment))plot(ds_cf(curricula)) plot(ds_mc(singaporean)) plot(ds_mcf(singaporean, crit = 1)) plot(ds_pc(christmas)) plot(ds_ro(goverment))
Artificial set of data where 13 people were asked two questions.
preferencespreferences
A data set of contingency responses:
A, B, CDo you prefer coffee to tea? (Yes, Not always, No)
Y, NDo you smoke? (Yes, No)
Artificial set of data where 13 people were asked two questions.
Nishisato, S. (1980). Analysis of categorical data: Dual Scaling and its Applications. University of Toronto: Heritage.
Nishisato, S. (1980). Analysis of categorical data: Dual Scaling and its Applications. University of Toronto: Heritage.
print method for package "dualScale"
## S3 method for class 'dualScale' print(x, ...)## S3 method for class 'dualScale' print(x, ...)
x |
An dualScale object for which a summary is desired |
... |
Arguments to be passed to methods |
A print of the available information from the object
print(ds_cf(curricula)) print(ds_cf(preferences)) print(ds_mc(singaporean)) print(ds_mcf(singaporean, crit = 1)) print(ds_pc(christmas)) print(ds_ro(goverment))print(ds_cf(curricula)) print(ds_cf(preferences)) print(ds_mc(singaporean)) print(ds_mcf(singaporean, crit = 1)) print(ds_pc(christmas)) print(ds_ro(goverment))
A short survey on childrem in Singapore.
singaporeansingaporean
A data set of 23 subjects on 4 multiple-choice questions:
AHow old are you? (1 = 20-29, 2 = 30-39, 3 = 40 or over)
BChildren today are not as disciplined as when I was a child (1 = agree, 2 = disagree, 3 = I cannot tell)
CChildren today are not as fortunate as when I was a child (1 = agree, 2 = disagree, 3 = I cannot tell)
DReligions should be taught at school (1 = agree, 2 = disagree, 3 = Indifferent)
The data were collected from 23 participants at a workshop in Singapore in 1985
Nishisato, S. and Nishisato, I.(1994). Dual Scaling in a Nutshell. Toronto: MicroStats.
Nishisato, S. (2007). Multidimensional Nonlinear Descriptive Analysis. Chapman & Hall/CRC.
summary method for class "dualScale"
## S3 method for class 'dualScale' summary(object, ...)## S3 method for class 'dualScale' summary(object, ...)
object |
An dualScale object for which a summary is desired |
... |
Arguments to be passed to methods |
A summary of the available information from the object
summary(ds_cf(curricula)) summary(ds_cf(preferences)) summary(ds_mc(singaporean)) summary(ds_mcf(singaporean, crit = 1)) summary(ds_pc(christmas)) summary(ds_ro(goverment))summary(ds_cf(curricula)) summary(ds_cf(preferences)) summary(ds_mc(singaporean)) summary(ds_mcf(singaporean, crit = 1)) summary(ds_pc(christmas)) summary(ds_ro(goverment))