Michael Thomas Flanagan's Java Scientific Library

Scores Class:     Replaced methods

     

Last update: 8 August 2012
Main Page of Michael Thomas Flanagan's Java Scientific Library

This class contains a description of methods that have been replaced in the class Scores but have been retained for compatibilty purposes.

REPLACED METHODS

Enter the data Read title, item names
and responses from text file
Enter responses
as rows per person
public void readScoresAsRowPerPerson()
public void readScoresAsRowPerPerson(String filename)
Enter responses
as rows per item
public void readScoresAsRowPerItem()
public void readScoresAsRowPerItem(Stringfilename)




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
public void readScoresAsRowPerPerson()
public void readScoresAsRowPerPerson(String filename)
Usage:                      sc.readScoresAsRowPerPerson();
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.readScoresAsRowPerPerson(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
     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 1 to item 2  . . .   response of person 1 to the nth item (all on one line)
     . . . .
     response of person m to item 1      response of person 1 to item 2  . . .   response of person 1 to the nth item (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 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 recognised non-numerical responses will be converted to a numeric format.
* 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 otherDichotomousData() 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 file, ScoresDataOne.txt, using spaces as separators.
Example data file, ScoresDataTwo.txt using spaces as separators with missing responses.
Example data file, ScoresDataThree.txt using commas as separators and spaces for missing responses.

Read responses as rows per item
public void readScoresAsRowPerItem()
public void readScoresAsRowPerItem(String filename)
Usage:                      sc.readScoresAsRowPerItem();
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.readScoresAsRowPerItem(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
     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 recognised non-numerical responses will be converted to a numeric format.
* 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 otherDichotomousData() 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.



Return to Scores documentation main page.



This page was prepared by Dr Michael Thomas Flanagan