Michael Thomas Flanagan's Java Scientific Library

Scores Class:     Two dimensional item-response matrices

     

Last update: 21 October 2012
Main Page of Michael Thomas Flanagan's Java Scientific Library

This class contains methods for entering a two dimensional data matrix, typically
In this documentation responses or measurements will be referred to as responses or scores, questions or environmental changes as items and the responding agencies as persons irrespective of whether the data is scientific, sociological, psychometric, educational etc. and whether the responding agency is human or inanimate.

This class is the superclass for the subclasses Cronbach (Cronbach's alpha consistency analysis) and PCA (Principal component analysis).

Responses may be entered as:
from a text file or as a 2D array (String, double, float, int, char, boolean or Matrix).
Response types may be mixed
Great care should be taken in assessing whether your data is appropriate if you are using this class to pepare non-parametric data for entry into a parametric test.
The principal methods of this class are:

Spelling note: All methods in this class containing 'standardized' or 'Standardized' in their name may be spelt with an s replacing the z, i.e. as 'standardised' or 'Standardised', e.g. the method standardizedAlpha() may also be spelt standardisedAlpha() and, similarly, Curtosis and Curtoses may replace Kurtosis and Kurtoses respectively.
Statistics notes: The terms mean, standard deviation, variance and covariance used in this page and in the method names refer to the sample means, sample standard deviations, sample variances and sample covariances.
The denominator of the varaiances, covariances, standard deviations, skewnesses and kurtoses may be set as n or as n−1. See Set denominator.

import directive: import flanagan.analysis.Scores;

SUMMARY OF METHODS

Constructor   public Scores()
Enter the data Read title, item names
and responses from text file
Enter responses
as rows per person
public void readScoresAsRowPerPersonA()
public void readScoresAsRowPerPersonA(String filename)
public void readScoresAsRowPerPersonB()
public void readScoresAsRowPerPersonB(String filename)
public void readScoresAsRowPerPersonC()
public void readScoresAsRowPerPersonC(String filename)
public void readScoresAsRowPerPersonD()
public void readScoresAsRowPerPersonD(String filename)
Enter responses
as rows per item
public void readScoresAsRowPerItemA()
public void readScoresAsRowPerItemA(Stringfilename)
public void readScoresAsRowPerItemB()
public void readScoresAsRowPerItemB(Stringfilename)
public void readScoresAsRowPerItemC()
public void readScoresAsRowPerItemC(Stringfilename)
public void readScoresAsRowPerItemD()
public void readScoresAsRowPerItemD(Stringfilename)
Enter data via program
arrays and Strings
Enter responses
as rows per person
public void enterScoresAsRowPerPerson(String[][] responses)
public void enterScoresAsRowPerPerson(double[][] responses)
public void enterScoresAsRowPerPerson(float[][] responses)
public void enterScoresAsRowPerPerson(int[][] responses)
public void enterScoresAsRowPerPerson(char[][] responses)
public void enterScoresAsRowPerPerson(boolean[][] responses)
public void enterScoresAsRowPerPerson(Matrix responses)
Enter responses
as rows per item
public void enterScoresAsRowPerItem(String[][] responses)
public void enterScoresAsRowPerItem(double[][] responses)
public void enterScoresAsRowPerItem(float[][] responses)
public void enterScoresAsRowPerItem(int[][] responses)
public void enterScoresAsRowPerItem(char[][] responses)
public void enterScoresAsRowPerItem(boolean[][] responses)
public void enterScoresAsRowPerItem(Matrix responses)
Enter title public void enterTitle(String title)
Enter item names public void enterItemNames(String[] itemNames)
Preprocess the entered data public void preprocessData()
Additional data entry options Suspend reading letters as numerals public void suspendLetterToNumeral()
public void letterToNumeral()
Dichotomous data pairs Declare data as dichotomous public void declareDataDichotomous()
Reset numerical representation public void resetDichotomousYesTrue(double newYesTrue)
public void resetDichotomousNoFalse(double newNoFalse)
Get numerical representation public double getDichotomousYesTrue()
public double getDichotomousNoFalse()
Additional dichotomous data pairs public void additionalDichotomousPairs(String falseSign, String trueSign)
Missing response
handling
Deletions Persons public void setPersonDeletionPercentage(double percentage)
Items public void setItemDeletionPercentage(double percentage)
Replacements public void setMissingDataOption(int option)
Set the denominator
(variance, standard deviation etc.)
Set to n public void setDenominatortoN()
Set to n-1 public void setDenominatortoNminusOne()
Output processed data and
output file options
Output processed data public void outputProcessedData(String filename)
public void outputProcessedData()
public void outputProcessedDataAlternate(String filename)
public void outputProcessedDataAlternate()
Set output file type public void setOutputFileType(int option)
Set incremented numbering of the output file public void setFileNumbering()
Remove incremented numbering of the output file public void removeFileNumbering()
Set output precision public void numberOfDecimalPlaces(int trunc)
public void numberOfDecimalPlacesAll(int trunc)
Scatter plots Plot of item - item responses raw data public void rawItemItemPlot(String itemName1, String itemName2)
public void rawItemItemPlot(int itemIndex1, int itemIndex2)
standardized data public void standardizedItemItemPlot(String itemName1, String itemName2)
public void standardizedItemItemPlot(int itemIndex1, int itemIndex2)
Plot of item - mean of items responses raw data public void rawItemMeansPlot(String itemName)
public void rawItemMeansPlot(int itemIndex)
standardized data public void standardizedItemMeansPlot(String itemName)
public void standardizedItemMeansPlot(int itemIndex)
Delete an item delete by name public double[][] deleteItem(String itemName)
delete by index public double[][] deleteItem(int itemIndex)
Correlation coefficients Between all items Correlation coefficient matrix public double[][] rawCorrelationCoefficients()
public double[][] standardizedCorrelationCoefficients()
Average correlation coefficient public double rawAverageCorrelationCoefficients()
public double standardizedAverageCorrelationCoefficients()
Average correlation coefficient
including item totals
public double rawAverageCorrelationCoefficientsWithTotals()
public double standardizedAverageCorrelationCoefficientsWithTotals()
Standard deviation of the correlation coefficients public double rawStandardDeviationCorrelationCoefficients()
public double standardizedStandardDeviationCorrelationCoefficients()
Standard deviation of the correlation coefficient
including item totals
public double rawStandardDeviationCorrelationCoefficientsWithTotals()
public double standardizedStandardDeviationCorrelationCoefficientsWithTotals()
Between pairs Item-item pair public double rawCorrelationCoefficient(String itemName1, String itemName2)
public double rawCorrelationCoefficient(int itemIndex1, int itemIndex2)
public double standardizedCorrelationCoefficient(String itemName1, String itemName2)
public double standardizedCorrelationCoefficient(int itemIndex1, int itemIndex2)
Item-(totals of the items) pair public double rawCorrelationCoefficient(String itemName)
public double rawCorrelationCoefficient(int itemIndex)
public double standardizedCorrelationCoefficient(String itemName)
public double standardizedCorrelationCoefficient(int itemIndex)
Covariances Between all items Covariance matrix public double[][] rawCovariances()
public double[][] standardizedCovariances()
Between pairs Item-item pair public double rawCovariance(String itemName1, String itemName2)
public double rawCovariance(int itemIndex1, int itemIndex2)
public double standardizedCovariance(String itemName1, String itemName2)
public double standardizedCovariance(int itemIndex1, int itemIndex2)
Item-(totals of the items) pair public double rawCovariance(String itemName)
public double rawCovariance(int itemIndex)
public double standardizedCovariance(String itemName)
public double standardizedCovariance(int itemIndex)
Item means Mean values of all items Raw data public double[] rawItemMeans()
Standardized data public double[] standardizedItemMeans()
Mean value of an individual item Raw data public double rawItemMean(int index)
public double rawItemMean(String name)
Standardized data public double standardizedItemMean(int index)
public double standardizedItemMean(String name)
Mean value of all item means Raw data public double rawMeanOfItemMeans()
Standardized data public double standardizedMeanOfItemMeans()
Standard deviation of all item means Raw data public double rawStandardDeviationOfItemMeans()
Standardized data public double standardizedStandardDeviationOfItemMeans()
Variance of all item means Raw data public double rawVarianceOfItemMeans()
Standardized data public double standardizedVarianceOfItemMeans()
Maximum of all item means Raw data public double rawMaximumOfItemMeans()
Standardized data public double standardizedMaximumOfItemMeans()
Minimum of all item means Raw data public double rawMinimumOfItemMeans()
Standardized data public double standardizedMinimumOfItemMeans()
Range of all item means Raw data public double rawRangeOfItemMeans()
Standardized data public double standardizedRangeOfItemMeans()
Item standard deviations Standard deviations of all items Raw data public double[] rawItemStandardDeviations()
Standardized data public double[] standardizedItemStandardDeviations()
Standard deviation value of an individual item Raw data public double rawItemStandardDeviation(int index)
public double rawItemStandardDeviation(String name)
Standardized data public double standardizedItemStandardDeviation(int index)
public double standardizedItemStandardDeviation(String name)
Mean value of all item standard deviations Raw data public double rawMeanOfItemStandardDeviations()
Standardized data public double standardizedMeanOfItemStandardDeviations()
Standard deviation of all item standard deviations Raw data public double rawStandardDeviationOfItemStandardDeviations()
Standardized data public double standardizedStandardDeviationOfItemStandardDeviations()
Variance of all item standard deviations Raw data public double rawVarianceOfItemStandardDeviations()
Standardized data public double standardizedVarianceOfItemStandardDeviations()
Maximum of all item standard deviations Raw data public double rawMaximumOfItemStandardDeviations()
Standardized data public double standardizedMaximumOfItemStandardDeviations()
Minimum of all item standard deviations Raw data public double rawMinimumOfItemStandardDeviations()
Standardized data public double standardizedMinimumOfItemStandardDeviations()
Range of all item standard deviations Raw data public double rawRangeOfItemStandardDeviations()
Standardized data public double standardizedRangeOfItemStandardDeviations()
Item variances Variances of all items Raw data public double[] rawItemVariances()
Standardized data public double[] standardizedItemVariances()
Variance of an individual item Raw data public double rawItemVariance(int index)
public double rawItemVariance(String name)
Standardized data public double standardizedItemVariance(int index)
public double standardizedItemVariance(String name)
Mean value of all item variances Raw data public double rawMeanOfItemVariances()
Standardized data public double standardizedMeanOfItemVariances()
Standard deviation of all item variances Raw data public double rawVarianceOfItemVariances()
Standardized data public double standardizedVarianceOfItemVariances()
Variance of all item variances Raw data public double rawVarianceOfItemVariances()
Standardized data public double standardizedVarianceOfItemVariances()
Maximum of all item variances Raw data public double rawMaximumOfItemVariances()
Standardized data public double standardizedMaximumOfItemVariances()
Minimum of all item variances Raw data public double rawMinimumOfItemVariances()
Standardized data public double standardizedMinimumOfItemVariances()
Range of all item variances Raw data public double rawRangeOfItemVariances()
Standardized data public double standardizedRangeOfItemVariances()
Item maxima Maxima of all items Raw data public double[] rawItemMaxima()
Standardized data public double[] standardizedItemMaxima()
Maximum of an individual item Raw data public double rawItemMaximum(int index)
public double rawItemMaximum(String name)
Standardized data public double standardizedItemMaximum(int index)
public double standardizedItemMaximum(String name)
Mean value of all item maxima Raw data public double rawMeanOfItemMaxima()
Standardized data public double standardizedMeanOfItemMaxima()
Standard deviation of all item maxima Raw data public double rawVarianceOfItemMaxima()
Standardized data public double standardizedVarianceOfItemMaxima()
Variance of all item maxima Raw data public double rawVarianceOfItemMaxima()
Standardized data public double standardizedVarianceOfItemMaxima()
Maximum of all item maxima Raw data public double rawMaximumOfItemMaxima()
Standardized data public double standardizedMaximumOfItemMaxima()
Minimum of all item maxima Raw data public double rawMinimumOfItemMaxima()
Standardized data public double standardizedMinimumOfItemMaxima()
Range of all item maxima Raw data public double rawRangeOfItemMaxima()
Standardized data public double standardizedRangeOfItemMaxima()
Item minima Minima of all items Raw data public double[] rawItemMinima()
Standardized data public double[] standardizedItemMinima()
Minimum of an individual item Raw data public double rawItemMinimum(int index)
public double rawItemMinimum(String name)
Standardized data public double standardizedItemMinimum(int index)
public double standardizedItemMinimum(String name)
Mean value of all item minima Raw data public double rawMeanOfItemMinima()
Standardized data public double standardizedMeanOfItemMinima()
Standard deviation of all item minima Raw data public double rawVarianceOfItemMinima()
Standardized data public double standardizedVarianceOfItemMinima()
Variance of all item minima Raw data public double rawVarianceOfItemMinima()
Standardized data public double standardizedVarianceOfItemMinima()
Minimum of all item minima Raw data public double rawMinimumOfItemMinima()
Standardized data public double standardizedMinimumOfItemMinima()
Minimum of all item minima Raw data public double rawMinimumOfItemMinima()
Standardized data public double standardizedMinimumOfItemMinima()
Range of all item minima Raw data public double rawRangeOfItemMinima()
Standardized data public double standardizedRangeOfItemMinima()
Item ranges Ranges of all items Raw data public double[] rawItemRanges()
Standardized data public double[] standardizedItemRanges()
Range of an individual item Raw data public double rawItemRange(int index)
public double rawItemRange(String name)
Standardized data public double standardizedItemRange(int index)
public double standardizedItemRange(String name)
Mean value of all item ranges Raw data public double rawMeanOfItemRanges()
Standardized data public double standardizedMeanOfItemRanges()
Standard deviation of all item ranges Raw data public double rawVarianceOfItemRanges()
Standardized data public double standardizedVarianceOfItemRanges()
Variance of all item ranges Raw data public double rawVarianceOfItemRanges()
Standardized data public double standardizedVarianceOfItemRanges()
Minimum of all item ranges Raw data public double rawMinimumOfItemRanges()
Standardized data public double standardizedMinimumOfItemRanges()
Minimum of all item ranges Raw data public double rawMinimumOfItemRanges()
Standardized data public double standardizedMinimumOfItemRanges()
Range of all item ranges Raw data public double rawRangeOfItemRanges()
Standardized data public double standardizedRangeOfItemRanges()
Item medians Medians of all items Raw data public double[] rawItemMedians()
Standardized data public double[] standardizedItemMedians()
Median of an individual item Raw data public double rawItemMedian(int index)
public double rawItemMedian(String name)
Standardized data public double standardizedItemMedian(int index)
public double standardizedItemMedian(String name)
Mean value of all item medians Raw data public double rawMeanOfItemMedians()
Standardized data public double standardizedMeanOfItemMedians()
Standard deviation of all item medians Raw data public double rawVarianceOfItemMedians()
Standardized data public double standardizedVarianceOfItemMedians()
Variance of all item medians Raw data public double rawVarianceOfItemMedians()
Standardized data public double standardizedVarianceOfItemMedians()
Minimum of all item medians Raw data public double rawMinimumOfItemMedians()
Standardized data public double standardizedMinimumOfItemMedians()
Minimum of all item medians Raw data public double rawMinimumOfItemMedians()
Standardized data public double standardizedMinimumOfItemMedians()
Range of all item medians Raw data public double rawRangeOfItemMedians()
Standardized data public double standardizedRangeOfItemMedians()
Item totals Totals of all items Raw data public double[] rawItemTotals()
Standardized data public double[] standardizedItemTotals()
Total of an individual item Raw data public double rawItemTotal(int index)
public double rawItemTotal(String name)
Standardized data public double standardizedItemTotal(int index)
public double standardizedItemTotal(String name)
Mean value of all item totals Raw data public double rawMeanOfItemTotals()
Standardized data public double standardizedMeanOfItemTotals()
Standard deviation of all item totals Raw data public double rawVarianceOfItemTotals()
Standardized data public double standardizedVarianceOfItemTotals()
Variance of all item totals Raw data public double rawVarianceOfItemTotals()
Standardized data public double standardizedVarianceOfItemTotals()
Minimum of all item totals Raw data public double rawMinimumOfItemTotals()
Standardized data public double standardizedMinimumOfItemTotals()
Minimum of all item totals Raw data public double rawMinimumOfItemTotals()
Standardized data public double standardizedMinimumOfItemTotals()
Range of all item totals Raw data public double rawRangeOfItemTotals()
Standardized data public double standardizedRangeOfItemTotals()
Item Moment Skewness Moment skewness of all items Raw data public double[] rawItemMomentSkewnessess()
Standardized data public double[] standardizedItemMomentSkewnessess()
Moment skewness of an individual item Raw data public double rawItemMomentSkewness(int index)
public double rawItemMomentSkewness(String name)
Standardized data public double standardizedItemMomentSkewness(int index)
public double standardizedItemMomentSkewness(String name)
Item Median Skewness Median skewness of all items Raw data public double[] rawItemMedianSkewnessess()
Standardized data public double[] standardizedItemMedianSkewnessess()
Median skewness of an individual item Raw data public double rawItemMedianSkewness(int index)
public double rawItemMedianSkewness(String name)
Standardized data public double standardizedItemMedianSkewness(int index)
public double standardizedItemMedianSkewness(String name)
Item Quartile Skewness Quartile skewness of all items Raw data public double[] rawItemQuartileSkewnessess()
Standardized data public double[] standardizedItemQuartileSkewnessess()
Quartile skewness of an individual item Raw data public double rawItemQuartileSkewness(int index)
public double rawItemQuartileSkewness(String name)
Standardized data public double standardizedItemQuartileSkewness(int index)
public double standardizedItemQuartileSkewness(String name)
Item Excess Kurtosis Excess kurtoses of all items Raw data public double[] rawItemExcesskurtoses()
Standardized data public double[] standardizedItemExcesskurtoses()
Excess kurtosis of an individual item Raw data public double rawItemExcessKurtosis(int index)
public double rawItemExcessKurtosis(String name)
Standardized data public double standardizedItemExcessKurtosis(int index)
public double standardizedItemExcessKurtosis(String name)
Item Names and Indices   Names of the used items public String[] itemNames()
Item names as entered public String[] originalItemNames()
Deleted item names public String[] deletedItemNames()
Index of an item public int itemIndex(String name)
Name of an item public String itemName(int index)
Number of Items   Number of items used public int usedNumberOfItems()
Number of items entered public int originalNumberOfItems()
Number of items deleted public int numberOfDeletedItems()
Person Means Mean values of all persons Raw data public double[] rawPersonMeans()
Standardized data public double[] standardizedPersonMeans()
Mean of an individual person Raw data public double rawPersonMean(int index)
Standardized data public double standardizedPersonMean(int index)
Person Standard Deviations Standard deviations of all persons Raw data public double[] rawPersonStandardDeviations()
Standardized data public double[] standardizedPersonStandardDeviations()
Standard deviation of an individual person Raw data public double rawPersonStandardDeviation(int index)
Standardized data public double standardizedPersonStandardDeviation(int index)
Person Variances Variances of all persons Raw data public double[] rawPersonVariances()
Standardized data public double[] standardizedPersonVariances()
Variance of an individual person Raw data public double rawPersonVariance(int index)
Standardized data public double standardizedPersonVariance(int index)
Person Maxima Maxima of all persons Raw data public double[] rawPersonMaxima()
Standardized data public double[] standardizedPersonMaxima()
Maximum of an individual person Raw data public double rawPersonMaximum(int index)
Standardized data public double standardizedPersonMaximum(int index)
Person Minima Minima of all persons Raw data public double[] rawPersonMinima()
Standardized data public double[] standardizedPersonMinima()
Minimum of an individual person Raw data public double rawPersonMinimum(int index)
Standardized data public double standardizedPersonMinimum(int index)
Person Ranges Ranges of all persons Raw data public double[] rawPersonRanges()
Standardized data public double[] standardizedPersonRanges()
Range of an individual person Raw data public double rawPersonRange(int index)
Standardized data public double standardizedPersonRange(int index)
Person Totals Totals of all persons Raw data public double[] rawPersonTotals()
Standardized data public double[] standardizedPersonTotals()
Total of an individual person Raw data public double rawPersonTotal(int index)
Standardized data public double standardizedPersonTotal(int index)
Person Indices   Indices of the used persons public String[] personIndices()
Deleted person indices public String[] deletedPersonsIndices()
Number of Persons   Number of Persons used public int usedNumberOfPersons()
Number of persons entered public int originalNumberOfPersons()
Number of persons deleted public int numberOfDeletedPersons()
All responses Mean Raw data public double rawAllResponsesMean()
Standardized data public double standardizedAllResponsesMean()
Standard Deviation Raw data public double rawAllResponsesStandardDeviation()
Standardized data public double standardizedAllResponsesStandardDeviation()
Variance Raw data public double rawAllResponsesVariance()
Standardized data public double standardizedAllResponsesVariance()
Minimum Raw data public double rawAllResponsesMinimum()
Standardized data public double standardizedAllResponsesMinimum()
Maximum Raw data public double rawAllResponsesMaximum()
Standardized data public double standardizedAllResponsesMaximum()
Range Raw data public double rawAllResponsesRange()
Standardized data public double standardizedAllResponsesRange()
Total Raw data public double rawAllResponsesTotal()
Standardized data public double standardizedAllResponsesTotal()
Responses Original responses as entered public Object originalScores()
as row per item public double[][] originalScoresAsRowPerItem()
as row per person public double[][] originalScoresAsRowPerPerson()
Used responses (Raw data) as row per item public double[][] usedScoresAsRowPerItem()
as row per person public double[][] usedScoresAsRowPerPerson()
Used responses (Standardized data) as row per item public double[][] standardizedScoresAsRowPerItem()
as row per person public double[][] standardizedScoresAsRowPerPerson()
Replaced responses item name and person index of replacements public String[] indicesOfReplacedScores()
Number of responses original number public int originalTotalNumberOfScores()
number used public int usedTotalNumberOfScores()
number deleted public int numberOfDeletedScores()
number of missing responses replaced public int numberOfReplacedScores()
Conversions Convert to Cronbach public Cronbach toCronbach()
Convert to PCA public PCA toPCA()




CONSTRUCTOR

public Scores()
Usage:                      Scores sc = new Scores();
Creates an instance of Scores.

ENTER DATA

The data may be read from a text file or entered via data arrays and Strings created within your program. The responses may be enetered as rows of responses per person or as rows of responses per item.

READ THE DATA FROM A TEXT FILE
The responses may be enetered as rows of responses per person or as rows of responses per item.

Read responses as rows per person

The responses may be read from a file of one of four formats:

Format A
readScoresAsRowPerPersonA

Title
Number of items
Number of persons
Row of item names
Matrix of scores arranged as rows
 starting with the person name
 then scores for that person
 with separators, e.g. space, comma.

details
Format B
readScoresAsRowPerPersonB

Title
Number of items
Number of persons
Row of item names
Row of person names
Matrix of scores arranged as
 row per person
 with separators, e.g. space, comma.

details
Format C
readScoresAsRowPerPersonC
Scores only

Matrix of scores arranged as
 row per person
 with separators, e.g. space, comma.

details
3
readScoresAsRowPerPersonD
Scores only

Matrix of single character scores arranged as
 row per person
 WITHOUT separators, e.g. 1101011

details
Replaced methods
readScoresAsRowPerPerson

Format A
public void readScoresAsRowPerPersonA()
public void readScoresAsRowPerPersonA(String filename)
Usage:                      sc.readScoresAsRowPerPersonA();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerPersonA(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataOne.txt".

The text file must be of the following format:

     data title
     number of items
     number of persons
     item names (one word each), as either a row or a column, e.g.    item1      item2  . . .   itemn
     name of person 1      response of person 1 to item 1      response of person 1 to item 2  . . .   response of person 1 to the nth item (all on one line)
     name of person 2      response of person 2 to item 1      response of person 2 to item 2  . . .   response of person 2 to the nth item (all on one line)
     . . .
     name of person m      response of person m to item 1      response of person m to item 2  . . .   response of person m to the nth item (all on one line)

where there are n items and m persons.
The item and person names must be single words. Each response may be a floating point number, an integer number, a single word or a single letter. The item names and responses may be separated from any preceding and/or any following number or word by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for a person must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:
      ScoresDataOneA.txt, using spaces as separators.
      ScoresDataTwoA.txt using spaces as separators with missing responses.
      ScoresDataThreeA.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_One.txt, 0/1 dichotomous data, 48 items, 150 persons, missing response represented by an X.

Format B
public void readScoresAsRowPerPersonB()
public void readScoresAsRowPerPersonB(String filename)
Usage:                      sc.readScoresAsRowPerPersonB();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerPersonB(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataOne.txt".

The text file must be of the following format:

     data title
     number of items
     number of persons
     item names (one word each), as either a row or a column, e.g.    item1      item2  . . .   itemn
     person names (one word each), as either a row or a column, e.g.    person1      person2  . . .   personm
     response of person 1 to item 1      response of person 1 to item 2  . . .   response of person 1 to the nth item (all on one line)
     response of person 2 to item 1      response of person 2 to item 2  . . .   response of person 2 to the nth item (all on one line)
     . . .
     response of person m to item 1      response of person m to item 2  . . .   response of person m to the nth item (all on one line)

where there are n items and m persons.
The item and person names must be single words. Each response may be a floating point number, an integer number, a single word or a single letter. The item names and responses may be separated from any preceding and/or any following number or word by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for a person must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:
      ScoresDataOneB.txt, using spaces as separators.
      ScoresDataTwoB.txt using spaces as separators with missing responses.
      ScoresDataThreeB.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_Two.txt, 0/1 dichotomous data, 48 items, 150 persons, missing response represented by a space.

Format C
public void readScoresAsRowPerPersonC()
public void readScoresAsRowPerPersonC(String filename)
Usage:                      sc.readScoresAsRowPerPersonC();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerPersonC(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataOne.txt".

The text file must be of the following format:

     response of person 1 to item 1      response of person 1 to item 2  . . .   response of person 1 to the nth item (all on one line)
     response of person 2 to item 1      response of person 2 to item 2  . . .   response of person 2 to the nth item (all on one line)
     . . .
     response of person m to item 1      response of person m to item 2  . . .   response of person m to the nth item (all on one line)

where there are n items and m persons.
Each response may be a floating point number, an integer number, a single word or a single letter. The responses may be separated from any preceding and/or any following number by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for a person must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:
      ScoresDataOneC.txt, using spaces as separators.
      ScoresDataTwoC.txt using spaces as separators with missing responses.
      ScoresDataThreeC.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_Three.txt, 0/1 dichotomous data, 48 items, 150 persons.

Format D
public void readScoresAsRowPerPersonD()
public void readScoresAsRowPerPersonD(String filename)
Usage:                      sc.readScoresAsRowPerPersonD();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerPersonD(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataOne.txt".

The text file must be of the following format:

     response of person 1 to item 1      response of person 1 to item 2  . . .   response of person 1 to the nth item (all on one line)
     response of person 2 to item 1      response of person 2 to item 2  . . .   response of person 2 to the nth item (all on one line)
     . . .
     response of person m to item 1      response of person m to item 2  . . .   response of person m to the nth item (all on one line)

where there are n items and m persons.
Each response may be a single character, i.e. a single digit number or a single alphabetic character. The responses should NOT be separated from the preceding and/or following response by a separator. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • integer pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any letter not listed above as a valid response.
Example data file: ExampleData_IRT_Four.txt, Y/N dichotomous data, 48 items, 150 persons, missing response represented by an X.

Replaced methods
public void readScoresAsRowPerPerson()
public void readScoresAsRowPerPerson(String filename)
The above format A to format D methods replace the original read from file methods, readScoresAsRowPerPerson() and readScoresAsRowPerPerson(filename). The older methods have been retained for compatibility purposes and their documentation may be accessed by clicking Scores - replaced methods.

Read responses as rows per item

The responses may be read from a file of one of four formats:

Format A
readScoresAsRowPerItemA

Title
Number of items
Number of persons
Row of item names
Matrix of scores arranged as rows
 starting with the item name
 then scores for that item
 with separators, e.g. space, comma.

details
Format B
readScoresAsRowPerItemB

Title
Number of items
Number of persons
Row of item names
Row of person names
Matrix of scores arranged as
 row per item
 with separators, e.g. space, comma.

details
Format C
readScoresAsRowPerItemC
Scores only

Matrix of scores arranged as
 row per item
 with separators, e.g. space, comma.

details
Format D
readScoresAsRowPerItemD
Scores only

Matrix of single character scores arranged as
 row per item
 WITHOUT separators, e.g. 1101011

details
Replaced methods
readScoresAsRowPerItem

Format A
public void readScoresAsRowPerItemA()
public void readScoresAsRowPerItemA(String filename)
Usage:                      sc.readScoresAsRowPerItemA();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerItemA(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataTwo.txt".

The text file must be of the following format:

     data title
     number of items
     number of persons
     person names (one word each), as either a row or a column, e.g.    person1      person2  . . .   personm
     name of item 1      response to item 1 by person 1      response to item 1 by person 2  . . .   response to item 1 by the mth person (all on one line)
     name of item 2      response to item 2 by person 1      response to item 2 by person 2  . . .   response to item 2 by the mth person(all on one line)
     . . . .
     name of item n      response to item n by person 1      response to item n by person 2  . . .   response to item n by the mth person (all on one line)

where there are n items and m persons.
The item and person names must be single words. Each response may be a floating point number, an integer, a single word or a single letter. The item names and responses may be separated from any preceding and/or any following number or word by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for an item must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:
      ScoresDataFourA.txt, using spaces as separators.
      ScoresDataFiveA.txt using spaces as separators with missing responses.
      ScoresDataSixA.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_Five.txt, 0/1 dichotomous data, 48 items, 150 persons.

Format B
public void readScoresAsRowPerItemB()
public void readScoresAsRowPerItemB(String filename)
Usage:                      sc.readScoresAsRowPerItemB();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerItemB(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataTwo.txt".

The text file must be of the following format:

     data title
     number of items
     number of persons
     item names (one word each), as either a row or a column, e.g.    item1      item2  . . .   itemn
     person names (one word each), as either a row or a column, e.g.    person1      person2  . . .   personm
     response to item 1 by person 1      response to item 1 by person 2  . . .   response to item 1 by the mth person (all on one line)
     response to item 2 by person 1      response to item 2 by person 2  . . .   response to item 2 by the mth person(all on one line)
     . . . .
     response to item n by person 1      response to item n by person 2  . . .   response to item n by the mth person (all on one line)

where there are n items and m persons.
The item names must be single words. Each response may be a floating point number, an integer, a single word or a single letter. The item names and responses may be separated from any preceding and/or any following number or word by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for an item must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:
      ScoresDataFourB.txt, using spaces as separators.
      ScoresDataFiveB.txt using spaces as separators with missing responses.
      ScoresDataSixB.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_Six.txt, dichotomous data, 48 items, 150 persons.

Format C
public void readScoresAsRowPerItemC()
public void readScoresAsRowPerItemC(String filename)
Usage:                      sc.readScoresAsRowPerItemC();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerItemC(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataTwo.txt".

The text file must be of the following format:

     response to item 1 by person 1      response to item 1 by person 2  . . .   response to item 1 by the mth person (all on one line)
     response to item 2 by person 1      response to item 2 by person 2  . . .   response to item 2 by the mth person(all on one line)
     . . . .
     response to item n by person 1      response to item n by person 2  . . .   response to item n by the mth person (all on one line)

where there are n items and m persons.
The item names must be single words. Each response may be a floating point number, an integer, a single word or a single letter. The item names and responses may be separated from any preceding and/or any following number or word by a single space or several spaces, a comma, a tab, a semicolon, colon or end of line. All responses for an item must be on the same line. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • NO, No, and no —> -1.0
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • YES, Yes, or yes —> +1.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> +1.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • NO, No, and no —> -1.0
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • YES, Yes, or yes —> 1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • FALSE, False, and false —> -1.0
  • TRUE, True, and true —> 1.0
  • integer or floating point pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any word or letter, prefereably a word, e.g. abs or missing, not listed above as a valid response. If it is represented by a space that space MUST be preceded and followed by a comma, a tab, a semicolon, colon or end of line.
Example data files:       ScoresDataOneC.txt, using spaces as separators.
      ScoresDataTwoC.txt using spaces as separators with missing responses.
      ScoresDataThreeC.txt using commas as separators and spaces for missing responses.
      ExampleData_IRT_Seven.txt, 0/1 dichotomous data, 48 items, 150 persons.

Format D
public void readScoresAsRowPerItemD()
public void readScoresAsRowPerItemD(String filename)
Usage:                      sc.readScoresAsRowPerItemD();
The data is read from a text (.txt) file selected via a dialogue window that will display all directories, and their files, on the user's computer and which opens, displaying the current directory, when this method is called.

Usage:                      sc.readScoresAsRowPerItemD(filename);
The data is read from the text (.txt) file filename. The file name must include its extension, e.g. .txt. It must either be in the working directory or the file name filename must also include the path to the appropriate directory, e.g. "C:\\AnalysisPrograms\\ScoresAnalyses\\ScoresDataTwo.txt".

The text file must be of the following format:

     response to item 1 by person 1      response to item 1 by person 2  . . .   response to item 1 by the mth person (all on one line)
     response to item 2 by person 1      response to item 2 by person 2  . . .   response to item 2 by the mth person(all on one line)
     . . . .
     response to item n by person 1      response to item n by person 2  . . .   response to item n by the mth person (all on one line)

where there are n items and m persons.
Each response may be a single character, i.e. a single digit number or a single alphabetic character. The responses should NOT be separated from the preceding and/or following response by a separator. The following list shows how the recognized non-numerical responses will be converted to a numeric format.
Non-dichotomous data
       
  • N and n, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0 [default value*]     otherwise —> 14.0
  • Y and y, if part of a YN dichotomous pair [N Y, n y, N y or n Y] —> +1.0 [default value*]     otherwise —> 21.0
  • A and a —> 1.0, B and b —> 2.0, C and c —> 3.0, . . . etc.
Dichotomous data
The folowing conversions operate if the data has been declared as dichotomous by calling the method
declareDataDichotomous()
       
  • N and n, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> -1.0
  • Y and y, as part of a YN dichotomous pair [N Y, n y, N y or n Y] —> 1.0
  • integer pair: the lower value —> -1.0, the higher value —> 1.0
  • alphabetic pair, other than above: the lower letter —> -1.0, the higher letter —> 1.0 [case independent, lowest letter = a, highetst letter = z]
* See Resetting dichotomous pair representation for methods that reset the half-pair values of dichotomous pairs, e.g. for converting YES and NO to 1 and 0.
See additionalDichotomousPairs() for setting the option of reading dichotomous data with a non-numerical dichotomous pair not listed above.
A missing response may be represented by any letter not listed above as a valid response.
Example data file, ExampleData_IRT_Eight.txt; 0/1 dichotomous data, 48 items, 150 persons, missing response represented by a space.

Replaced methods
public void readScoresAsRowPerItem()
public void readScoresAsRowPerItem(String filename)
The above format A to format D methods replace the original read from file methods, readScoresAsRowPerItem() and readScoresAsRowPerItem(filename). The older methods have been retained for compatibility purposes and their documentation may be accessed by clicking Scores - replaced methods.




ENTER DATA VIA PROGRAM ARRAYS AND STRINGS
The responses may be enetered as rows of responses per person or as rows of responses per item.

Enter responses as rows per person
public void enterScoresAsRowPerPerson(String[][] responses)
public void enterScoresAsRowPerPerson(double[][] responses)
public void enterScoresAsRowPerPerson(float[][] responses)
public void enterScoresAsRowPerPerson(int[][] responses)
public void enterScoresAsRowPerPerson(char[][] responses)
public void enterScoresAsRowPerPerson(boolean[][] responses)
public void enterScoresAsRowPerPerson(Matrix responses)
Usage:                      sc.enterScoresAsRowPerPerson(responses);
The responses are entered via the two-dimension al array, responses. The array must be ordered in the following manner:

     responses[0][0] - response of person 1 to item 1      responses[0][1] - response of person 1 to item 2  . . .   responses[0][n-1] - response of person 1 to the nth item
     responses[1][0] - response of person 2 to item 1      responses[1][1] - response of person 1 to item 2  . . .   responses[1][n-1] - response of person 2 to the nth item
     . . . .
     responses[m-1][0] - response of person m to item 1      responses[m-1][1] - response of person m to item 2  . . .   responses[m-1][n-1] - response of person m to the nth item
where there are n items and m persons.
The allowed formats of the responses depends on the type of the array:



Enter responses as rows per item
public void enterScoresAsRowPerItem(String[][] responses)
public void enterScoresAsRowPerItem(double[][] responses)
public void enterScoresAsRowPerItem(float[][] responses)
public void enterScoresAsRowPerItem(int[][] responses)
public void enterScoresAsRowPerItem(char[][] responses)
public void enterScoresAsRowPerItem(boolean[][] responses)
public void enterScoresAsRowPerItem(Matrix responses)
Usage:                      sc.enterScoresAsRowPerItem(responses);
The responses are entered via the two-dimension al array, responses. The array must be ordered in the following manner:

     responses[0][0] - response to item 1 of person 1      responses[0][1] - response to item 1 of person 2  . . .   responses[0][m-1] - response to item 1 of the mth person
     responses[1][0] - response to item 2 of person 1      responses[1][1] - response to item 2 of person 2  . . .   responses[1][m-1] - response to item 2 of the mth person
     . . . .
     responses[n-1][0] - response to item n of person 1      responses[n-1][1] - response to item n of person 2  . . .   responses[n-1][m-1] - response to item n of the mth person
where there are n items and m persons.
The allowed formats of the responses depends on the type of the array:



ENTER TITLE
public void enterTitle(String title)
Usage:                      sc.enterTitle(title)
This is an optional method, for use if the responses have been entered via an array within your program. The data title is entered via the String argument title. A second line,
  Program execution initiated at the time on the date
will be automatically added to the entered title. This title may be used as a header to any output files created by a subclass.
If this method is not called, and the responses have been entered via an array within your program, a default title,
  Untitled Scores Analysis
  Program execution initiated at the time on the date
will be created.



ITEM NAMES
Enter the item names
public void enterItemNames(String[] names)
Usage:                      sc.enterItemNames(names)
This is an optional method, for use if the responses have been entered via an array within your program. The item names are entered via the String[] argument names. It is suggested that you use short single word descriptors as these names are used as column headers in the output files created by subclasses. If this method is not called, and the responses have been entered via an array within your program, an array of default names,
  item1,  item2,  item3,  item4 . . .
will be created.

Get all the entered item names
public String[] originalItemNames()
Usage:                      itemNames = sc.originalItemNames()
This method returns the item names of all the items entered, i.e. before any item deletions have been made.

Get all the item names used
public String[] itemNames()
Usage:                      itemNames = sc.itemNames()
This method returns the item names of the items used, i.e. after any item deletions have been made.

Get an person used item name
public String itemNames(int index)
Usage:                      itemName = sc.itemNames(index)
This method returns the item name of the item with the index index. NOTE!! the indices of the items starts at 1 NOT at 0.

Get the index of an item
public int itemIndex(String itemName)
Usage:                      index = sc.itemIndex(itemName)
This method returns the index of the item named itemName. NOTE!! the indices of the items starts at 1 NOT at 0.



PREPROCESS THE ENTERED DATA

public void preprocessData()
Usage:                      sc.preprocessData()
This method is only required if you are creating a new subclass that uses Scores as its superclass. It processes the scores to fill all score matrices and, where necessary, assign appropriate dichotomous values and missing values. Relevant methods, requiring these activities, automatically call this method in Scores and its subclasses, Cronbach and PCA.



ADDITIONAL DATA ENTRY OPTIONS

SUSPEND READING LETTERS AS NUMERALS
Suspeding the alphabetic to numerical conversion
public void suspendLetterToNumeral()
Usage:                      sc.suspendLetterToNumeral()
The default option of this class (since 18 November 2010) is that alphabetic responses are converted to numerical responses (See read and enter methods above for conversion details). Calling this method suspends these conversions.

Restoring the alphabetic to numerical conversion
public void letterToNumeral()
Usage:                      sc.letterToNumeral()
The method restores the conversion of alphabetic responses to numerical responses (See read and enter methods above for conversion details). It need only be called if such conversions have been suspended (see method immediately above) and need restoring.



DICHOTOMOUS DATA PAIRS

Declare Data as Dichotomous
public void declareDataDichotomous()
Usage:                      sc.declareDataDichotomous()
This method ensures that entered data is treated as dichotomous. Obviously the entered data must be dichotomous but, additionally, calling this method ensures that handling of missing responses is performed maintaining a dichotomous set of data. If you require the data to be declared dichotomous this method should be called before any other method.

Reset Dichotomous Data Pair Numerical Representation
public void resetDichotomousYesTrue(double newYesTrue)
Usage:                      sc.resetDichotomousYesTrue(newYesTrue)
This method resets the numerical representation of the dichotomous half-pair responses, e.g. true, True, TRUE, yes, Yes, YES, y and Y, to the value passed as the argument newYesTrue. The default value is 1.

public void resetDichotomousNoFalse(double newNoFalse)
Usage:                      sc.resetDichotomousNoFalse(NoFalse)
This method resets the numerical representation of the dichotomous half-pair responses, e.g. false, false, FALSE, no, No, NO, n and N, to the value passed as the argument newNoFalse. The default value is -1.

Get the Dichotomous Data Pair Numerical Representations
public double getDichotomousYesTrue()
Usage:                      yvalue = sc.getDichotomousYesTrue()
This method returns the numerical value used to represent the dichotomous half-pair Yes, yes, Yes, Y, y, True, TRUE, True or any added equivalent.

public double getDichotomousNoFalse()
Usage:                      nvalue = sc.getDichotomousNoFalse()
This method returns the numerical value used to represent the dichotomous half-pair no, No, NO, n , N, false, false, FALSE or any added equivalent.

Additional Dichotomous Data Pairs
public void additionalDichotomousPairs(String falseSign, String trueSign)
Usage:                      sc.additionalDichotomousPairs(falseSign, trueSign)
This method should be called if you wish any of the above appropriate response entry methods to read dichotomous data in which the dichotomous pair is not one of the pairs already recognized by this class. The recognized pairs are (true, True or TRUE)/(false, false or FALSE), (yes, Yes, YES, y or Y)/(no, No, NO, n or N) or any numerical pair. If your pair is not one of the recognized pair enter the pair via the arguments falseSign and trueSign. Responses equal to the argument falseSign, on data processing, will be converted to -1 [default value] and those equal to trueSign will be converted to 1 [default value]. See immediately above for methods that can be called to alter the true/yes and false/no default values. This additionalDichotomousPairs method may be called if the data has been or will be read in from a text file or has been or will be entered via a String[][] array or a char[][] array.

The method public void otherDichotomousData(String falseSign, String trueSign) performs the same function as public void additionalDichotomousPairs(String falseSign, String trueSign).



MISSING RESPONSES

Missing responses ('no responses'), i.e. the failure of an person to respond to an item, may be dealt with by replacement (replacement options below), deletion of the person or deletion of an item.

DELETIONS
Persons
public void setPersonDeletionPercentage(double percentage)
Usage:                      sc.setPersonDeletionPercentage(percentage)
This method allows the setting of the percentage of 'missing responses' associated with a person at which all the responses of that person will be deleted. The required percentage is entered via the argument percentage. A value of 0.0 will ensure that an person is deleted if that person misses just 1 response. A value of 100.0 ensures that no person will be deleted. The default value, i.e. the value used if this method is not called, is 0.0. Missing responses that are not deleted will be replaced (see setMissingDataOption for replacement options).

Items
public void setItemDeletionPercentage(double percentage)
Usage:                      sc.setItemDeletionPercentage(percentage)
This method allows the setting of the percentage of 'missing responses' associated with an item at which all the responses of that item will be deleted. The required percentage is entered via the argument percentage. A value of 0.0 will ensure that an item is deleted if it contains only 1 missing response. A value of 100.0 ensures that no item will be deleted. The default value, i.e. the value used if this method is not called, is 100.0. Missing responses that are not deleted will be replaced (see setMissingDataOption for replacement options).

REPLACEMENTS
public void setMissingDataOption(int option)
Usage:                      sc.setMissingDataOption(option)
This method allows a choice of the replacement procedure for missing responses that have not been deleted. The option choice is entered as the integer argument option. There are 5 options for both non-dichotomous and dichotomous data:
     Non-dichotomous data
  • option = 1 the missing response is replaced by zero
  • option = 2 the missing response is replaced by that person's mean
  • option = 3 the missing response is replaced by that item's mean (default option)
  • option = 4 the missing response is replaced by the overall mean
  • option = 5 the missing response is replaced by a user supplied score for each missing response. A value will be requested, via a dialog box, each time a missing response is encounterd as the data is processed.
Dichotomous data
The method declareDataDichotomous() must have been called if the following replacements are to operate.
  • option = 1 the missing response is replaced by the lower of the dichotomous pair values (default value = -1)
  • option = 2 the missing response is replaced by that person's rounded mean
  • option = 3 the missing response is replaced by that item's rounded mean (default option)
  • option = 4 the missing response is replaced by the overall rounded mean
  • option = 5 the missing response is replaced by a user supplied score for each missing response. A value will be requested, via a dialog box, each time a missing response is encounterd as the data is processed.
A rounded mean is either the lower value of dichotomous pair (default value = -1) or the higher value of dichotomous pair (default value = +1), whichever is nearer to the actual mean.
See Resetting dichotomous pair representation for changing the default values.

The default option, i.e. the option used if this method is not called, is option 3. See deletions for deletion options.



SETTING THE DENOMINATOR

public void setDenominatorToN()
Usage:                      sc.setDenominatorToN();
Sets the denominator of the calculated variances, covariances, standard deviations, moment skewnesses, median skewnesses or kurtoses to the number of data points, n, e.g. a standard deviation will be calculated as

The default value of the denominator is (n − 1),

public void setDenominatorToNminusOne()
Usage:                      sc.setDenominatorToNminusOne();
Sets the denominator of the calculated variances, covariances, standard deviations, moment skewnesses, median skewnesses or kurtoses to the number of data points minus one, (n−1), e.g. a standard deviation will be calculated as

The is the default value and this method need only be called in the above method (set to n) as already been called and a reset to (n − 1) is required.



DELETE AN ITEM

public double[][] deleteItem(String itemName)
public double[][] deleteItem(int itemIndex)
Usage:                      newResponseMatrix = sc.deleteItem(itemName)
This method returns a matrix containing the entered data with the item with the name contained in the String itemName deleted. The returned matrix contains any 'missing response' replacements in the remaining responses that were made in the original response matrix and will not contain any deletion made to the original data. The format of the returned matrix is responses of each item per column.

Usage:                      newResponseMatrix = sc.deleteItem(itemIndex)
This method returns a matrix containing the entered data with the item of index itemIndex deleted. The indices run from 1 to n. The returned matrix contains any 'missing response' replacements in the remaining responses that were made in the original response matrix and will not contain any deletion made to the original data. The format of the returned matrix is responses of each item per column.



SCATTER PLOTS

Plot of item - item responses
public void rawItemItemPlot(String itemName1, String itemName2)
public void rawItemItemPlot(int item1Index1, int itemIndex2)
public void standardizedItemItemPlot(String itemName1, String itemName2)
public void standardizedItemItemPlot(int item1Index1, int itemIndex2)
Usage:                      sc.rawItemItemPlot(itemName1, itemName2)
Calling this method displays, in a new window, a plot of the raw data responses of the item named itemName1 against the raw data responses of the item named itemName2.

Usage:                      sc.rawItemItemPlot(itemIndex1, itemIndex2)
Calling this method displays, in a new window, a plot of the raw data responses of the item with an index itemIndex1 against the raw data responses of the item with an index itemIndex2. NOTE!! the item indices start at 1 not at 0. See Item Names for methods that return an item index or name.

Usage:                      sc.standardizedItemItemPlot(itemName1, itemName2)
Calling this method displays, in a new window, a plot of the standardized data responses of the item named itemName1 against the standardized data responses of the item named itemName2.

Usage:                      sc.standardizedItemItemPlot(itemIndex1, itemIndex2)
Calling this method displays, in a new window, a plot of the standardized data responses of the item with an index itemIndex1 against the standardized data responses of the item with an index itemIndex2. NOTE!! the item indices start at 1 not at 0. See Item Names for methods that return an item index or name.

Plot of item - means of item responses
public void rawItemMeansPlot(String itemName)
public void rawItemMeansPlot(int item1Index)
public void standardizedItemMeansPlot(String itemName)
public void standardizedItemMeansPlot(int item1Index)
Usage:                      sc.rawItemMeansPlot(itemName)
Calling this method displays, in a new window, a plot of the raw data responses of the item named itemName against the means of the raw data responses of all items.

Usage:                      sc.rawItemMeansPlot(itemIndex)
Calling this method displays, in a new window, a plot of the raw data responses of the item with an index itemIndex a against the means of the raw data responses of all items. NOTE!! the item indices start at 1 not at 0. See Item Names for methods that return an item index or name.

Usage:                      sc.standardizedItemMeansPlot(itemName)
Calling this method displays, in a new window, a plot of the standardized data responses of the item named itemName against the means of the standardized data responses of all items.

Usage:                      sc.standardizedItemMeansPlot(itemIndex)
Calling this method displays, in a new window, a plot of the standardized data responses of the item with an index itemIndex against the means of the standardized data responses of all items. NOTE!! the item indices start at 1 not at 0. See Item Names for methods that return an item index or name.





CORRELATION COEFFICIENTS

BETWEEN ALL ITEMS
Correlation Coefficient Matrix
public double[][] rawCorrelationCoefficients()
public double[][] standardizedCorrelationCoefficients()
Usage:                      corrCoeff = sc.rawCorrelationCoefficients()
This method returns an (n+1) times (n+1) matrix where n is the number of items. Rows and columns 0 to n-1 contain the correlation coefficients, for the raw data responses, between all pairs of items, e.g. corrCoeff[0][3] contains the correlation coefficient between the first item and the fourth item. Rows and columns n contain the correlation coefficients between the items and the totals of all the items, e.g. corrCoeff[1][n] contains the correlation coefficient, for the raw data responses, between the second item and the totals of all n items.

Usage:                      corrCoeff = sc.standardizedCorrelationCoefficients()
This method returns an (n+1) times (n+1) matrix where n is the number of items. Rows and columns 0 to n-1 contain the correlation coefficients, for the standardized data responses, between all pairs of items, e.g. corrCoeff[0][3] contains the correlation coefficient between the first item and the fourth item. Rows and columns n contain the correlation coefficients between the items and the totals of all the items, e.g. corrCoeff[1][n] contains the correlation coefficient, for the standardized data responses, between the second item and the totals of all n items.

Average correlation coefficient, excluding totals
public double rawAverageCorrelationCoefficients()
public double standardizedAverageCorrelationCoefficients()
Usage:                      meanCorrCoeff = sc.rawAverageCorrelationCoefficients()
This method returns, for the raw data responses, the average of all the correlation coefficients between items,

where n is the number of items and ri,j is the correlation coefficient between the ith and jth items. This method does not include, in the average, the correlation coefficients with the totals of all the items (see
below).

Usage:                      meanCorrCoeff = sc.standardizedAverageCorrelationCoefficients()
This method returns, for the standardized data responses, the average of all the correlation coefficients between items,

where n is the number of items and ri,j is the correlation coefficient between the ith and jth items. This method does not include, in the average, the correlation coefficients with the totals of all the items (see below).

Average correlation coefficient, including totals
public double rawStandardDeviationCorrelationCoefficientsWithTotals()
public double standardizedStandardDeviationCorrelationCoefficientsWithTotals()
Usage:                      meanCorrCoeff = sc.rawStandardDeviationCorrelationCoefficientsWithTotals()
This method returns, for the raw data responses, the average of all the correlation coefficients between items and the totals of all items,

where n is the number of items and ri,j, for i and j less than or equal to n is the correlation coefficient between the ith and jth items and ri,n+1 is the correlation coefficient between the ith item and the totals of all items. See
above) for exclusion of totals.

Usage:                      meanCorrCoeff = sc.standardizedStandardDeviationCorrelationCoefficientsWithTotals()
This method returns, for the standardized data responses, the average of all the correlation coefficients between items and the totals of all items,

where n is the number of items and ri,j, for i and j less than or equal to n is the correlation coefficient between the ith and jth items and ri,n+1 is the correlation coefficient between the ith item and the totals of all items. See above for exclusion of totals.

Standard deviation of the correlation coefficients, excluding totals
public double rawStandardDeviationCorrelationCoefficients()
public double standardizedStandardDeviationCorrelationCoefficients()
Usage:                      sdCorrCoeff = sc.rawStandardDeviationCorrelationCoefficients()
This method returns, for the raw data responses, the standard deviation of all the correlation coefficients between items. This method does not include, in the average, the correlation coefficients with the totals of all the items (see
below).

Usage:                      sdCorrCoeff = sc.standardizedStandardDeviationCorrelationCoefficients()
This method returns, for the standardized data responses, the standard deviation of all the correlation coefficients between items. This method does not include, in the average, the correlation coefficients with the totals of all the items (see below).

Standard deviation of the correlation coefficients, including totals
public double rawStandardDeviationCorrelationCoefficientsWithTotals()
public double standardizedStandardDeviationCorrelationCoefficientsWithTotals()
Usage:                      sdCorrCoeff = sc.rawStandardDeviationCorrelationCoefficientsWithTotals()
This method returns, for the raw data responses, the standard deviation of all the correlation coefficients between items and the totals of all items. See
above) for exclusion of totals.

Usage:                      sdCorrCoeff = sc.standardizedStandardDeviationCorrelationCoefficientsWithTotals()
This method returns, for the standardized data responses, the standard deviation of all the correlation coefficients between items and the totals of all items. See above for exclusion of totals.

BETWEEN PAIRS
Item-item pair
public double rawCorrelationCoefficient(String itemName1, String itemName2)
public double rawCorrelationCoefficient(int itemIndex1, int itemIndex2)
public double standardizedCorrelationCoefficient(String itemName1, String itemName2)
public double standardizedCorrelationCoefficient(int itemIndex1, int itemIndex2)
Usage:                      corrCoeff = sc.rawCorrelationCoefficient(itemName1, itemName2)
This method returns the correlation coefficient, for the raw data responses, between the item with the name contained in the String itemName1 and the item with the name contained in the String itemName2.

Usage:                      corrCoeff = sc.rawCorrelationCoefficient(itemIndex1, itemIndex2)
This method returns the correlation coefficient, for the raw data responses, between the item of index itemIndex1 and the item of index itemIndex2. The indices run from 1 to n.

Usage:                      corrCoeff = sc.standardizedCorrelationCoefficient(itemName1, itemName2)
This method returns the correlation coefficient, for the standardized data responses, between the item with the name contained in the String itemName1 and the item with the name contained in the String itemName2.

Usage:                      corrCoeff = sc.standardizedCorrelationCoefficient(itemIndex1, itemIndex2)
This method returns the correlation coefficient, for the standardized data responses, between the item of index itemIndex1 and the item of index itemIndex2. The indices run from 1 to n.

Item-(totals of all items) pair
public double rawCorrelationCoefficient(String itemName)
public double rawCorrelationCoefficient(int itemIndex)
public double standardizedCorrelationCoefficient(String itemName)
public double standardizedCorrelationCoefficient(int itemIndex)
Usage:                      corrCoeff = sc.rawCorrelationCoefficient(itemName)
This method returns the correlation coefficient, for the raw data responses, between the item with the name contained in the String itemName and the totals of all items.

Usage:                      corrCoeff = sc.rawCorrelationCoefficient(itemIndex)
This method returns the correlation coefficient, for the raw data responses, between the item of index itemIndex and the totals of all items. The indices run from 1 to n.

Usage:                      corrCoeff = sc.standardizedCorrelationCoefficient(itemName1)
This method returns the correlation coefficient, for the standardized data responses, between the item with the name contained in the String itemName1 and the totals of all items.

Usage:                      corrCoeff = sc.standardizedCorrelationCoefficient(itemIndex)
This method returns the correlation coefficient, for the standardized data responses, between the item of index itemIndex aand the totals of all items. The indices run from 1 to n.





COVARIANCES

BETWEEN ALL ITEMS
Covariance Matrix
public double[][] rawCovariances()
public double[][] standardizedCovariances()
Usage:                      covar = sc.rawCovariances()
This method returns an (n+1) times (n+1) matrix where n is the number of items. Rows and columns 0 to n-1 contain the covariances, for the raw data responses, between all pairs of items, e.g. corrCoeff[0][3] contains the covariance between the first item and the fourth item. Rows and columns n contain the covariances between the items and the totals of all the items, e.g. corrCoeff[1][n] contains the covariance, for the raw data responses, between the second item and the totals of all n items. The diagonal elements contain the variances, e.g. covar[2][2] contins the variance of the third item.
See Setting the denominator for covariance formulae options.

Usage:                      covar = sc.standardizedCovariances()
This method returns an (n+1) times (n+1) matrix where n is the number of items. Rows and columns 0 to n-1 contain the covariances, for the standardized data responses, between all pairs of items, e.g. corrCoeff[0][3] contains the covariance between the first item and the fourth item. Rows and columns n contain the covariances between the items and the totals of all the items, e.g. corrCoeff[1][n] contains the covariance, for the standardized data responses, between the second item and the totals of all n items. The diagonal elements contain the variances, e.g. covar[2][2] contins the variance of the third item.
See Setting the denominator for covariance formulae options.

BETWEEN PAIRS
Item-item pair
public double rawCovariance(String itemName1, String itemName2)
public double rawCovariance(int itemIndex1, int itemIndex2)
public double standardizedCovariance(String itemName1, String itemName2)
public double standardizedCovariance(int itemIndex1, int itemIndex2)
Usage:                      covar = sc.rawCovariance(itemName1, itemName2)
This method returns the covariance, for the raw data responses, between the item with the name contained in the String itemName1 and the item with the name contained in the String itemName2.

Usage:                      covar = sc.rawCovariance(itemIndex1, itemIndex2)
This method returns the covariance, for the raw data responses, between the item of index itemIndex1 and the item of index itemIndex2. The indices run from 1 to n.

Usage:                      covar = sc.standardizedCovariance(itemName1, itemName2)
This method returns the covariance, for the standardized data responses, between the item with the name contained in the String itemName1 and the item with the name contained in the String itemName2.

Usage:                      covar = sc.standardizedCovariance(itemIndex1, itemIndex2)
This method returns the covariance, for the standardized data responses, between the item of index itemIndex1 and the item of index itemIndex2. The indices run from 1 to n.

See Setting the denominator for covariance formulae options.

Item-(totals of all items) pair
public double rawCovariance(String itemName)
public double rawCovariance(int itemIndex)
public double standardizedCovariance(String itemName)
public double standardizedCovariance(int itemIndex)
Usage:                      covar = sc.rawCovariance(itemName)
This method returns the covariance, for the raw data responses, between the item with the name contained in the String itemName and the totals of all items.

Usage:                      covar = sc.rawCovariance(itemIndex)
This method returns the covariance, for the raw data responses, between the item of index itemIndex and the totals of all items. The indices run from 1 to n.

Usage:                      covar = sc.standardizedCovariance(itemName1)
This method returns the covariance, for the standardized data responses, between the item with the name contained in the String itemName1 and the totals of all items.

Usage:                      covar = sc.standardizedCovariance(itemIndex)
This method returns the covariance, for the standardized data responses, between the item of index itemIndex aand the totals of all items. The indices run from 1 to n.

See Setting the denominator for covariance formulae options.



ITEM MEANS

MEAN VALUES OF ALL ITEMS
Raw data
public double[] rawItemMeans()
Usage:                      itemMeans = sc.rawItemMeans()
This method returns the means, calculated using the raw data, of all the items. The order of items is as entered minus any deleted due to missing responses.
Standardized data
public double[] standardizedItemMeans()
Usage:                      itemMeans = sc.standardizedItemMeans()
This method returns the means, calculated using standardized data, of all the items. The order of items is as entered minus any deleted due to missing responses.

MEAN VALUE OF AN INDIVIDUAL ITEM
Raw data
public double rawItemMean(int index)
public double rawItemMean(String name)
Usage:                      itemMean = sc.rawItemMean(item)
This method returns the mean, calculated using the raw data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.
Standardized data
public double standardizedItemMean(int index)
public double standardizedItemMean(String name)
Usage:                      itemMean = sc.standardizedItemMean(item)
This method returns the mean, calculated using standardized data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.

MEAN VALUE OF ALL ITEM MEANS
Raw data
public double rawMeanOfItemMeans()
Usage:                      itemMeanOfMeans = sc.rawMeanOfItemMeans()
This method returns the mean, calculated using the raw data, of the means of all items.
Standardized data
public double standardizedMeanOfItemMeans()
Usage:                      itemMeanOfMeans = sc.standardizedMeanOfItemMeans()
This method returns the mean, calculated using standardized data, of the means of all items.

STANDARD DEVIATION OF ALL ITEM MEANS
Raw data
public double rawStandardDeviationOfItemMeans()
Usage:                      itemSdOfMeans = sc.rawStandardDeviationOfItemMeans()
This method returns the standard deviation, calculated using the raw data, of the means of all items.
Standardized data
public double[] standardizedStandardDeviationOfItemMeans()
Usage:                      itemSdOfMeans = sc.standardizedStandardDeviationOfItemMeans()
This method returns the standard deviation, calculated using standardized data, of the means of all items.

See Setting the denominator for standard deviation formulae options.

VARIANCE OF ALL ITEM MEANS
Raw data
public double rawVarianceOfItemMeans()
Usage:                      itemVarOfMeans = sc.rawVarianceOfItemMeans()
This method returns the variance, calculated using the raw data, of the means of all items.
Standardized data
public double[] standardizedVarianceOfItemMeans()
Usage:                      itemVarOfMeans = sc.standardizedVarianceOfItemMeans()
This method returns the variance, calculated using standardized data, of the means of all items.

See Setting the denominator for variance formulae options.

MAXIMUM OF ALL ITEM MEANS
Raw data
public double rawMaximumOfItemMeans()
Usage:                      itemMaxOfMeans = sc.rawMaximumOfItemMeans()
This method returns the maximum, calculated using the raw data, of the means of all items.
Standardized data
public double[] standardizedMaximumOfItemMeans()
Usage:                      itemMaxOfMeans = sc.standardizedMaximumOfItemMeans()
This method returns the maximum, calculated using standardized data, of the means of all items.

MINIMUM OF ALL ITEM MEANS
Raw data
public double rawMinimumOfItemMeans()
Usage:                      itemMinOfMeans = sc.rawMinimumOfItemMeans()
This method returns the minimum, calculated using the raw data, of the means of all items.
Standardized data
public double[] standardizedMinimumOfItemMeans()
Usage:                      itemMinOfMeans = sc.standardizedMinimumOfItemMeans()
This method returns the minimum, calculated using standardized data, of the means of all items.

RANGE OF ALL ITEM MEANS
Raw data
public double rawRangeOfItemMeans()
Usage:                      itemRangeOfMeans = sc.rawRangeOfItemMeans()
This method returns the range, calculated using the raw data, of the means of all items.
Standardized data
public double[] standardizedRangeOfItemMeans()
Usage:                      itemRangeOfMeans = sc.standardizedRangeOfItemMeans()
This method returns the range, calculated using standardized data, of the means of all items.



ITEM MOMENT SKEWNESS

The moment skewness of an item is defined as

where xi are the responses to the item in question, is the sample mean of the item and s is the sample standard deviation of the item.
The default denominator is (n−1). See Setting the denominator for methods resetting the denominator.

MOMENT SKEWNESS OF ALL ITEMS
Raw data
public double[] rawItemMomentSkewnessess()
Usage:                      skewness = sc.rawItemMomentSkewnessess()
This method returns the moment skewnesses, calculated using the raw data, of all the items. The order of items is as entered minus any deleted due to missing responses.
Standardized data
public double[] standardizedItemMomentSkewnessess() Usage:                      skewness = sc.standardizedItemMomentSkewnessess()
This method returns the moment skewnesses, calculated using standardized data, of all the items. The order of items is as entered minus any deleted due to missing responses.

MOMENT SKEWNESS OF AN INDIVIDUAL ITEM
Raw data
public double rawItemMomentSkewness(int index)
public double rawItemMomentSkewness(String name)
Usage:                      skewness = sc.rawItemMomentSkewness(item)
This method returns the moment skewness, calculated using the raw data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.
Standardized data
public double standardizedItemMomentSkewness(int index)
public double standardizedItemMomentSkewness(String name)
Usage:                      skewness = sc.standardizedItemMomentSkewness(item)
This method returns the moment skewness, calculated using standardized data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.

ITEM MEDIAN SKEWNESS (Pearson's median skewness coefficient)

The median skewness of an item is defined as

See Setting the denominator for standard deviation formulae options.

MEDIAN SKEWNESS OF ALL ITEMS
Raw data
public double[] rawItemMedianSkewnessess()
Usage:                      skewness = sc.rawItemMedianSkewnessess()
This method returns the median skewnesses, calculated using the raw data, of all the items. The order of items is as entered minus any deleted due to missing responses.
Standardized data
public double[] standardizedItemMedianSkewnessess()
Usage:                      skewness = sc.standardizedItemMedianSkewnessess()
This method returns the median skewnesses, calculated using standardized data, of all the items. The order of items is as entered minus any deleted due to missing responses.

MEDIAN SKEWNESS OF AN INDIVIDUAL ITEM
Raw data
public double rawItemMedianSkewness(int index)
public double rawItemMedianSkewness(String name)
Usage:                      skewness = sc.rawItemMedianSkewness(item)
This method returns the median skewness, calculated using the raw data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.
Standardized data
public double standardizedItemMedianSkewness(int index)
public double standardizedItemMedianSkewness(String name)
Usage:                      skewness = sc.standardizedItemMedianSkewness(item)
This method returns the median skewness, calculated using standardized data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.

ITEM QUARTILE SKEWNESS (Bowley skewness coefficient)

The quartile skewness of an item is defined as

where the Qs denote the interquartile ranges of the item.

QUARTILE SKEWNESS OF ALL ITEMS
Raw data
public double[] rawItemMedianSkewnessess()
Usage:                      skewness = sc.rawItemQuartileSkewnessess()
This method returns the quartile skewnesses, calculated using the raw data, of all the items. The order of items is as entered minus any deleted due to missing responses.
Standardized data
public double[] rawItemQuartileSkewnessess()
Usage:                      skewness = sc.standardizedItemQuartileSkewnessess()
This method returns the quartile skewnesses, calculated using standardized data, of all the items. The order of items is as entered minus any deleted due to missing responses.

QUARTILE SKEWNESS OF AN INDIVIDUAL ITEM
Raw data
public double rawItemQuartileSkewness(int index)
public double rawItemQuartileSkewness(String name)
Usage:                      skewness = sc.rawItemMedianSkewness(item)
This method returns the quartile skewness, calculated using the raw data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.
Standardized data
public double standardizedItemQuartileSkewness(int index)
public double standardizedItemQuartileSkewness(String name)
Usage:                      skewness = sc.standardizedItemMedianSkewness(item)
This method returns the quartile skewness, calculated using standardized data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.



ITEM EXCESS KURTOSIS

The excess kurtosis of an item is defined as

where xi are the responses to the item in question, is the sample mean of the item and s is the sample standard deviation opf the item, i.e. returns the kurtosis of the item minus the kurtosis of a Gaussian distribution (3.0).
The default denominator is (n−1). See Setting the denominator for methods resetting the denominator.

EXCESS KURTOSES OF ALL ITEMS
Raw data
public double[] rawItemExcessKurtoses()
Usage:                      kurtoses = sc.rawItemExcessKurtoses()
This method returns the excess kurtoses, calculated using the raw data, of all the items. The order of items is as entered minus any deleted due to missing responses.
Standardized data
public double[] standardizedItemExcesskurtoses()
Usage:                      kurtoses = sc.standardizedItemExcesskurtoses()
This method returns the excess kurtoses, calculated using standardized data, of all the items. The order of items is as entered minus any deleted due to missing responses.

EXCESS KURTOSIS OF AN INDIVIDUAL ITEM
Raw data
public double rawItemExcessKurtosis(int index)
public double rawItemExcessKurtosis(String name)
Usage:                      kurtosis = sc.rawItemExcessKurtosis(item)
This method returns the excess kurtosis, calculated using the raw data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.
Standardized data
public double standardizedItemExcessKurtosis(int index)
public double standardizedItemExcessKurtosis(String name)
Usage:                      kurtosis = sc.standardizedItemExcessKurtosis(item)
This method returns the excess kurtosis, calculated using standardized data, of an individual item. The item may be identified (argument item) by its index or its name. Note that the order of items starts at 1 and NOT 0. The order is as entered minus any deleted due to missing responses.



ITEM NAMES AND INDICES

NAMES OF THE USED ITEMS
public String[] itemNames()
Usage:                      names = sc.itemNames()
This method returns the names of the items used, i.e. after any deletions due to 'missing responses'.

NAMES OF THE ENTERED ITEMS
public String[] originalItemNames()
Usage:                      names = sc.originalItemNames()
This method returns the names of the items originally entered, i.e. before any deletions due to 'missing responses'.

NAMES OF ANY DELETED ITEMS
public String[] deletedItemsNames()
Usage:                      names = sc.deletedItemsNames()
This method returns the names of items originally entered but then deleted as part of the 'missing responses' handling. If no items have been deleted null is returned.

INDEX OF AN ITEM
public int itemIndex(String name)
Usage:                      index = sc.itemIndex(name)
This method returns the index of the item whose name is passed to the method as the argument name. NOTE the indices of names start at 1 and NOT at zero.

NAME OF AN ITEM
public String itemName(int index)
Usage:                      name = sc.itemName(index)
This method returns the name of the item whose index is passed to the method as the argument index. NOTE the indices of names start at 1 and NOT at zero.



NUMBER OF ITEMS

Number of items used
public int usedNumberOfItems()
Usage:                      num = sc.usedNumberOfItems()
This method returns the number of items used, i.e. after any deletions due to the 'missing response' handling.

Number of items entered
public int originalnumberOfItems()
Usage:                      num = sc.originalnumberOfItems()
This method returns the number of items entered, i.e. before any deletions due to the 'missing response' handling.

Number of items deleted
public int numberOfDeletedItems()
Usage:                      num = sc.numberOfDeletedItems()
This method returns the number of items deleted due to the 'missing response' handling.



PERSON INDICES

INDICES OF THE USED PERSONS
public String[] personIndices()
Usage:                      names = sc.personIndices()
This method returns the indices of the persons used, i.e. after any deletions due to 'missing responses'. NOTE the indices of the persons start at 1 and NOT at zero.

INDICES OF ANY DELETED PERSONSS
public String[] deletedPersonsIndices()
Usage:                      names = sc.deletedPersonsIndices()
This method returns the indices of items originally entered but then deleted as part of the 'missing responses' handling. NOTE the indices of the persons start at 1 and NOT at zero.



NUMBER OF PERSONS

Number of persons used
public int usedNumberOfPersons()
Usage:                      num = sc.usedNumberOfPersons()
This method returns the number of persons used, i.e. after any deletions due to the 'missing response' handling.

Number of persons entered
public int originalnumberOfPersons()
Usage:                      num = sc.originalnumberOfPersons()
This method returns the number of persons entered, i.e. before any deletions due to the 'missing response' handling.

Number of persons deleted
public int numberOfDeletedPersons()
Usage:                      num = sc.numberOfDeletedPersons()
This method returns the number of persons deleted due to the 'missing response' handling.



RESPONSES

ORIGINAL RESONSES
Responses as originally entered
public Object originalScores()
Usage:                      originalData = sc.originalScores()
This method returns the responses as originally entered, i.e. before any deletions. They are returned as a Java Object as they may have been entered as String[][], double[][], float[][], int[][], char[][], boolean[][] or Matrix. If they were originally read in from a text file the returned Object is of type String[][].

Original responses as row per item
public double[][] originalScoresAsRowPerItem()
Usage:                      originalData = sc.originalScoresAsRowPerItem()
This method returns the original responses entered rearranged as a two dimensional array of doubles orgainized as a row of responses for each item. Missing responses are returned as Double.NaN.

Original responses as row per person
public double[][] originalScoresAsRowPerPerson()
Usage:                      originalData = sc.originalScoresAsRowPerPerson()
This method returns the original responses entered rearranged as a two dimensional array of doubles orgainized as a row of responses for each person. Missing responses are returned as Double.NaN.

RESPONSES AS USED (RAW DATA)
Responses as used as row per item
public double[][] usedScoresAsRowPerItem()
Usage:                      data = sc.usedScoresAsRowPerItem()
This method returns the raw data responses as used, i.e. minus any deleted items or persons, arranged as a two dimensional array of doubles orgainized as a row of responses for each item. Retained missing responses are returned with the chosen substituted values.

Responses as used as row per person
public double[][] usedScoresAsRowPerItem()
Usage:                      data = sc.usedScoresAsRowPerPerson()
This method returns the raw data responses as used, i.e. minus any deleted items or persons, arranged as a two dimensional array of doubles orgainized as a row of responses for each person. Retained missing responses are returned with the chosen substituted values.

RESPONSES AS USED (STANDARDIZED DATA)
Standardized responses as used as row per item
public double[][] standardizedScoresAsRowPerItem()
Usage:                      data = sc.standardizedScoresAsRowPerItem()
This method returns the standardized data responses as used, i.e. minus any deleted items or persons, arranged as a two dimensional array of doubles orgainized as a row of responses for each item. Retained missing responses are returned with the chosen standardized substituted values.

Standardized responses as used as row per person
public double[][] standardizedScoresAsRowPerItem()
Usage:                      data = sc.standardizedScoresAsRowPerPerson()
This method returns the standardized data responses as used, i.e. minus any deleted items or persons, arranged as a two dimensional array of doubles orgainized as a row of responses for each person. Retained missing responses are returned with the chosen standardized substituted values.

ITEM NAME AND PERSON INDEX OF THE REPLACED RESPONSES
Standardized responses as used as row per item
public String[] indicesOfReplacedScores()
Usage:                      repl = sc.ndicesOfReplacedScores()
This method returns the item name and person index for all 'missing responses' that have been replaced rather than deleted. NOTE that the indices of the persons starts at 1 NOT at 0.

NUMBER OF RESPONSES
Original number of scores
public int originalTotalNumberOfScores()
Usage:                      nScores = sc.originalTotalNumberOfScores()
This method returns the original number of responses entered, i.e. before any deletions.

Number of scores used
public int usedTotalNumberOfScores()
Usage:                      nScores = sc.usedTotalNumberOfScores()
This method returns the number of responses used, i.e. after any deletions.

Number of deleted scores
public int numberOfDeletedScores()
Usage:                      nDeletes = sc.numberOfDeletedScores()
This method returns the number of responses that have been deleted in the handling of any 'missing responses'.

Number of replacement scores
public int numberOfReplacedScores()
Usage:                      nDeletes = sc.numberOfReplacedScores()
This method returns the number of responses that have been replaced in the handling of any 'missing responses'.



FILE OUTPUT OPTIONS

These methods are relevant to output files created by subclasses.

Set output file type
public void setOutputFileType(int option)
Usage:                      sc.setOutputFileType(option)
This method allows the setting of the type of output file to which a subclass may write data. There are two options set by the argument option:

Set incremental numbering of output filename to prevent overwriting
public void setFileNumbering()
Usage:                      sc.setFileNumbering()
If this optional method is called a integer number will be added to the name of the output file to which a subclass may write data. On the first creation of a file of the given file name the number will be 1. On further creations of a file of the same given file name the number will be incremented by 1 thus prevention overwriting of the file.

Remove incremental numbering of output filename
public void removeFileNumbering()
Usage:                      sc.removeFileNumbering()
If this method is called the incremental numbering of the output file, to which a subclass may write data, described in setFileNumbering() above, is removed.

Set the precision with which floating point numbers are written
public void numberOfDecimalPlaces(int trunc)
Usage:                      sc.numberOfDecimalPlaces(trunc)
This optional method sets the number of places displayed after the decimal point when floating point numbers are written to an output file, to which a subclass may write data. The number of places required is entered via the argument trunc. The default value is 6. The displayed number is the rounded equivalent of the stored number. If the precision of the entered data is greater than the value trunc the output method overides the trunc value and uses the maximum precision of the entered data. See immediately below (numberOfDecimalPlacesAll) for a method that sets the output precision irrespective of the input precision.

public void numberOfDecimalPlacesAll(int trunc)
Usage:                      sc.numberOfDecimalPlacesAll(trunc)
This optional method sets the number of places displayed after the decimal point when floating point numbers are written to an output file, to which a subclass may write data. The number of places required is entered via the argument trunc. The default value is 6. The displayed number is the rounded equivalent of the stored number. The precision set by this method is used in the output irrespective of the precision of the input data. See immediately above (numberOfDecimalPlaces) for a method that sets takes the precision of the entered data into account.



OUTPUT THE PROCESSED DATA

Output the processed data in the same line order as the entered data
public void outputProcessedData(String filename)
public void outputProcessedData()
Usage:                      sc.outputProcessedData(filename)
This method performs a full analysis (details below) and writes the results of the data processing, i.e. the entered data with any conversion of alphabetic scores to numerical scores and replacements of missing responses, to a file named filename. The output will be arranged in the same line order as the entered data, e.g. if the data was entered as scores of an individual person to each item on one line the output data will be arranged as the processed scores of an individual person to each item on one line (See outputProcessedDataAlternate method below for an output with switched data order).
If you add the ".txt" extension to the name in the the String filename the results will be written to a text file that displays the results in an easily readable format.
If you add the ".xls" extension, the results are written in a format to facilitate display by Microsoft Excel. On opening, with Microsoft Excel, a ".xls" file created by this method Microsoft Excel may ask you to verify that file is Excel readable. Click the "yes" button in the query box.
The output file will be created in the directory in which you are working unless you add a path to filename, e.g. "C:\\AnalysisPrograms\\Scores\\ScoresOutput.txt".

Usage:                      sc.outputProcessedData()
This method performs a full analysis (details below) and writes the results to a text file named ScoresOutput. The output will be arranged in the same line order as the entered data, e.g. if the data was entered as scores of an individual person to each item on one line the output data will be arranged as the processed scores of an individual person to each item on one line (See outputProcessedDataAlternate method below for an output with switched data order). The default option of this method is to write to a text file that displays the results in an easily readable format. Calling the method setOutputFileType(option) allows this option to be changed to one in which he results are written in a format to facilitate display by Microsoft Excel. On opening, with Microsoft Excel, a ".xls" file created by this method Microsoft Excel may ask you to verify that file is Excel readable. Click the "yes" button in the query box.
The output file will be created in the directory in which you are working.

The output file will contain the following:

Output the processed data in the alternate line order to that of the entered data
public void outputProcessedDataAlternate(String filename)
public void outputProcessedDataAlternate()
Usage:                      sc.outputProcessedDataAlternate(filename)
This method performs a full analysis (details below) and writes the results of the data processing, i.e. the entered data with any conversion of alphabetic scores to numerical scores and replacements of missing responses, to a file named filename. The output will be arranged in the alternate line order to that of the the entered data, e.g. if the data was entered as scores of an individual person to all items on one line the output data will be arranged as the processed scores of all individuals for a given item on one line (See outputProcessedData method above for an output with the same data order).
If you add the ".txt" extension to the name in the the String filename the results will be written to a text file that displays the results in an easily readable format.
If you add the ".xls" extension, the results are written in a format to facilitate display by Microsoft Excel. On opening, with Microsoft Excel, a ".xls" file created by this method Microsoft Excel may ask you to verify that file is Excel readable. Click the "yes" button in the query box.
The output file will be created in the directory in which you are working unless you add a path to filename, e.g. "C:\\AnalysisPrograms\\Scores\\ScoresOutput.txt".

Usage:                      sc.outputProcessedDataAlternate()
This method performs a full analysis (details below) and writes the results to a text file named ScoresOutput. The output will be arranged in the alternate line order to that of the the entered data, e.g. if the data was entered as scores of an individual person to all items on one line the output data will be arranged as the processed scores of all individuals for a given item on one line (See outputProcessedData method above for an output with the same data order).
The default option of this method is to write to a text file that displays the results in an easily readable format. Calling the method setOutputFileType(option) allows this option to be changed to one in which the results are written in a format to facilitate display by Microsoft Excel. On opening, with Microsoft Excel, a ".xls" file created by this method Microsoft Excel may ask you to verify that file is Excel readable. Click the "yes" button in the query box.
The output file will be created in the directory in which you are working.

The output file will contain the following:




CONVERSIONS

Convert to Cronbach
public Cronbach toCronbach()
Usage:                      cr = sc.toCronbach()
This method returns an instance of Cronbach, cr, with its common instance variables initialized to those of the instance of Scores, sc.

Convert to PCA
public PCA toPCA()
Usage:                      pca = sc.toPCA()
This method returns an instance of PCA, pca, with its common instance variables initialized to those of the instance of Scores, sc.





SOME OF THE DOCUMENTATION IS STILL UNDER CONSTRUCTION

Some of the item statistic methods, e.g. rawItemStandardDeviation(), person statistic methods, e.g. standardizedPersonVariances(), and allResponses statistic methods, e.g. rawAllResponsesMaximum(), have still to be fully documented. All of these follow the same format as that of the corresponding methods in the
Item Means methods documented above. Their full individual documentation will be added later.



EXAMPLE PROGRAM

An example program, AlphabeticToNumeric, and the associated documentation may be found on AlphabeticToNumeric.



OTHER CLASSES USED BY THIS CLASS

This class uses the following classes in this library:


This page was prepared by Dr Michael Thomas Flanagan