}
private void analysisText(){
FileOutput fout = null;
if(this.fileNumberingSet){
fout = new FileOutput(this.outputFilename, 'n');
}
else{
fout = new FileOutput(this.outputFilename);
}
// calculate alphas if not already calculated
if(!rawAlphaCalculated)this.rawAlpha();
if(!standardizedAlphaCalculated)this.standardizedAlpha();
// output title information
fout.println("CRONBACH'S ALPHA RELIABILITY ESTIMATOR");
fout.println("Program: Cronbach - Analysis Output");
for(int i=0; i<this.titleLines; i++)fout.println(title[i]);
Date d = new Date();
String day = DateFormat.getDateInstance().format(d);
String tim = DateFormat.getTimeInstance().format(d);
fout.println("Program executed at " + tim + " on " + day);
fout.println();
// output reliability estimators
int field = 36; // field width
fout.println("RELIABILITY ESTIMATORS");
fout.println("Cronbach's coefficient alpha");
fout.print("Raw data ", field);
fout.println(Fmath.truncate(this.rawAlpha, this.trunc));
fout.print("Standardized data ", field);
fout.println(Fmath.truncate(this.standardizedAlpha, this.trunc));
fout.println();
fout.println("Average of the inter-item correlation coefficients, excluding item totals");
fout.print("Raw data ", field);
fout.println(Fmath.truncate(this.rawMeanRhoWithoutTotals, this.trunc));
fout.print("Standardized data ", field);
fout.println(Fmath.truncate(this.standardizedMeanRhoWithoutTotals, this.trunc));
fout.println();
fout.println("Average of the inter-item correlation coefficients, including item totals");
fout.print("Raw data ", field);
fout.println(Fmath.truncate(this.rawMeanRhoWithTotals, this.trunc));
fout.print("Standardized data ", field);
fout.println(Fmath.truncate(this.standardizedMeanRhoWithTotals, this.trunc));
fout.println();
// output any deletions or replacements
fout.println("'NO RESPONSE' DELETIONS AND REPLACEMENTS");
// deleted persons
field = 34;
int fieldInt = 6;
boolean deletionFlag = false;
if(this.nDeletedPersons!=0){
deletionFlag = true;
fout.print("Number of persons deleted ", field);
fout.println(this.nDeletedPersons);
fout.print("Indices of deleted persons: ", field);
for(int i=0; i<this.nDeletedPersons; i++)fout.print((this.deletedPersonsIndices[i]+1), fieldInt);
fout.println();
}
else{
fout.println("No persons were deleted ");
}
// deleted items
if(this.nDeletedItems!=0){
deletionFlag = true;
fout.print("Number of items deleted ", field);
fout.println(this.nDeletedItems);
fout.print("Names of deleted items: ", field);
for(int i=0; i<this.nDeletedItems; i++)fout.print(this.originalItemNames[this.deletedItemsIndices[i]], fieldInt);
fout.println();
}
else{
fout.println("No items were deleted ");
}
// replacements
if(this.nReplacements!=0){
fout.printtab("Number of 'no responses' replaced ");
fout.println(this.nReplacements);
fout.print("Item name and person index of replacements: ", 50);
for(int i=0; i<this.nReplacements; i++)fout.print((this.replacementIndices[i]+" "), fieldInt);
fout.println();
fout.print("Replacement option: ", field);
fout.println(this.replacementOptionNames[this.replacementOption-1]);
fout.println();
}
else{
if(deletionFlag){
fout.println("No 'no response' replacements, other than any above deletions, were made ");
}
else{
fout.println("No 'no response' replacements were made ");
}
}
fout.println();
fout.print("Number of items used", 35);
fout.println(this.nItems);
fout.print("Number of persons used", 35);
fout.println(this.nPersons);
fout.println();
// Correlation coefficients
int len = this.trunc+8;
int fieldItemName = 0;
for(int i=0; i<=this.nItems; i++)if(this.itemNames[i].length()>fieldItemName)fieldItemName = this.itemNames[i].length();
int fieldItemNumber = fieldItemName;
if(len>fieldItemNumber)fieldItemNumber = len;
fieldItemName++;
fieldItemNumber++;
fout.println("CORRELATION COEFFICIENTS");
fout.println("Correlation coefficients between items - raw data");
fout.print(" ", fieldItemName);
for(int i=0; i<=this.nItems; i++)fout.print(this.itemNames[i], fieldItemNumber);
fout.println();
for(int i=0; i<=this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
for(int j=0; j<=this.nItems; j++)fout.print(Fmath.truncate(this.rawCorrelationCoefficients[i][j], this.trunc), fieldItemNumber);
fout.println();
}
fout.println();
fout.print("Average inter-item correlation coefficient (excluding total) ", 80);
fout.println(Fmath.truncate(this.rawMeanRhoWithoutTotals, this.trunc));
fout.print("Standard deviation of the inter-item correlation coefficient (excluding total) ", 80);
fout.println(Fmath.truncate(this.rawStandardDeviationRhoWithoutTotals, this.trunc));
fout.print("Average inter-item correlation coefficient (including total) ", 80);
fout.println(Fmath.truncate(this.rawMeanRhoWithTotals, this.trunc));
fout.print("Standard deviation of the inter-item correlation coefficient (including total) ", 80);
fout.println(Fmath.truncate(this.rawStandardDeviationRhoWithTotals, this.trunc));
fout.println();
fout.println("Correlation coefficients between items - standardized data");
fout.print(" ", fieldItemName);
for(int i=0; i<=this.nItems; i++)fout.print(this.itemNames[i], fieldItemNumber);
fout.println();
for(int i=0; i<=this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
for(int j=0; j<=this.nItems; j++)fout.print(Fmath.truncate(this.standardizedCorrelationCoefficients[i][j], this.trunc), fieldItemNumber);
fout.println();
}
fout.println();
fout.print("Average inter-item correlation coefficient (excluding total) ", 80);
fout.println(Fmath.truncate(this.standardizedMeanRhoWithoutTotals, this.trunc));
fout.print("Standard deviation of the inter-item correlation coefficient (excluding total) ", 80);
fout.println(Fmath.truncate(this.standardizedStandardDeviationRhoWithoutTotals, this.trunc));
fout.print("Average inter-item correlation coefficient (including total) ", 80);
fout.println(Fmath.truncate(this.standardizedMeanRhoWithTotals, this.trunc));
fout.print("Standard deviation of the inter-item correlation coefficient (including total) ", 80);
fout.println(Fmath.truncate(this.standardizedStandardDeviationRhoWithTotals, this.trunc));
fout.println();
// item statistics
if(fieldItemNumber<12)fieldItemNumber = 12;
fout.println("ITEMS: MEANS, STANDARD DEVIATIONS, SKEWNESS AND KURTOSIS");
fout.println("Raw data");
fout.print("item ", fieldItemName);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("moment", fieldItemNumber);
fout.print("median", fieldItemNumber);
fout.print("quartile", fieldItemNumber);
fout.print("kurtosis", fieldItemNumber);
fout.println("dichotomous");
fout.print(" ", fieldItemName);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.print("excess ", fieldItemNumber);
fout.println("percentage");
for(int i=0; i<this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
fout.print(Fmath.truncate(this.rawItemMeans[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemStandardDeviations[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMomentSkewness[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMedianSkewness[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemQuartileSkewness[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemKurtosisExcess[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.dichotomousPercentage[i], 1));
}
fout.println();
fout.println("ITEMS: MINIMA, MAXIMA, MEDIANS, RANGES AND TOTALS");
fout.println("Raw data");
fout.print("item ", fieldItemName);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("median", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.print("total", fieldItemNumber);
fout.println("dichotomous");
fout.print(" ", fieldItemName);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println("percentage");
for(int i=0; i<this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
fout.print(Fmath.truncate(this.rawItemMinima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMaxima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMedians[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemRanges[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemTotals[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.dichotomousPercentage[i], 1));
}
fout.println();
int fieldItemSName = 25;
fout.print("item", fieldItemSName);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("variance", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.println("range");
fout.print("statistic ", fieldItemSName);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println(" ");
fout.print("item means", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemMeansMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMeansSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMeansVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMeansMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMeansMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemMeansRange, this.trunc));
fout.print("item standard deviations", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemStandardDeviationsMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemStandardDeviationsSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemStandardDeviationsVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemStandardDeviationsMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemStandardDeviationsMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemStandardDeviationsRange, this.trunc));
fout.print("item variances", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemVariancesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemVariancesSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemVariancesVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemVariancesMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemVariancesMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemVariancesRange, this.trunc));
fout.print("item mimima", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemMinimaMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMinimaSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMinimaVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMinimaMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMinimaMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemMinimaRange, this.trunc));
fout.print("item maxima", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemMaximaMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMaximaSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMaximaVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMaximaMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMaximaMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemMaximaRange, this.trunc));
fout.print("item medians", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemMediansMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMediansSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMediansVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMediansMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemMediansMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemMediansRange, this.trunc));
fout.print("item ranges", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemRangesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemRangesSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemRangesVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemRangesMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemRangesMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemRangesRange, this.trunc));
fout.print("item totals", fieldItemSName);
fout.print(Fmath.truncate(this.rawItemTotalsMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemTotalsSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemTotalsVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemTotalsMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawItemTotalsMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawItemTotalsRange, this.trunc));
fout.println();
fout.println("standardized data");
fout.print("item ", fieldItemName);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("moment", fieldItemNumber);
fout.print("median", fieldItemNumber);
fout.print("quartile", fieldItemNumber);
fout.println("kurtosis");
fout.print(" ", fieldItemName);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.print("skewness", fieldItemNumber);
fout.println("excess ");
for(int i=0; i<this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
fout.print(Fmath.truncate(this.standardizedItemMeans[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviations[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMomentSkewness[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMedianSkewness[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemQuartileSkewness[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemKurtosisExcess[i], this.trunc));
}
fout.println();
fout.print("item ", fieldItemName);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("median", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.println("total");
fout.print(" ", fieldItemName);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println(" ");
for(int i=0; i<this.nItems; i++){
fout.print(this.itemNames[i], fieldItemName);
fout.print(Fmath.truncate(this.standardizedItemMinima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMaxima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMedians[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemRanges[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemTotals[i], this.trunc));
}
fout.println();
fout.print("item", fieldItemSName);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("variance", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.println("range");
fout.print("statistic ", fieldItemSName);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println(" ");
fout.print("item means", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemMeansMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMeansSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMeansVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMeansMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMeansMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemMeansRange, this.trunc));
fout.print("item standard deviations", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviationsMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviationsSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviationsVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviationsMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemStandardDeviationsMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemStandardDeviationsRange, this.trunc));
fout.print("item variances", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemVariancesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemVariancesSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemVariancesVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemVariancesMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemVariancesMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemVariancesRange, this.trunc));
fout.print("item mimima", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemMinimaMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMinimaSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMinimaVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMinimaMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMinimaMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemMinimaRange, this.trunc));
fout.print("item maxima", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemMaximaMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMaximaSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMaximaVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMaximaMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMaximaMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemMaximaRange, this.trunc));
fout.print("item medians", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemMediansMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMediansSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMediansVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMediansMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemMediansMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemMediansRange, this.trunc));
fout.print("item ranges", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemRangesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemRangesSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemRangesVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemRangesMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemRangesMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemRangesRange, this.trunc));
fout.print("item totals", fieldItemSName);
fout.print(Fmath.truncate(this.standardizedItemTotalsMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemTotalsSd, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemTotalsVar, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemTotalsMin, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedItemTotalsMax, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedItemTotalsRange, this.trunc));
fout.println();
fout.println("DELETION OF ITEMS");
int fieldDitem = 16;
if(fieldItemName>fieldDitem)fieldDitem=fieldItemName;
fout.print(" ", fieldDitem);
fout.print("Raw data", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println("Standardized data");
fout.print("Deleted item", fieldDitem);
fout.print("Alpha", fieldItemNumber);
fout.print("Correlation", fieldItemNumber);
fout.print("Average", fieldItemNumber);
fout.print("Average", fieldItemNumber);
fout.print("Alpha", fieldItemNumber);
fout.print("Correlation", fieldItemNumber);
fout.print("Average", fieldItemNumber);
fout.println("Average");
fout.print(" ", fieldDitem);
fout.print(" ", fieldItemNumber);
fout.print("coefficient", fieldItemNumber);
fout.print("inter-item", fieldItemNumber);
fout.print("inter-item", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("coefficient", fieldItemNumber);
fout.print("inter-item", fieldItemNumber);
fout.println("inter-item");
fout.print(" ", fieldDitem);
fout.print(" ", fieldItemNumber);
fout.print("with total", fieldItemNumber);
fout.print("correlation", fieldItemNumber);
fout.print("correlation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("with total", fieldItemNumber);
fout.print("correlation", fieldItemNumber);
fout.println("correlation");
fout.print(" ", fieldDitem);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("coefficient", fieldItemNumber);
fout.print("coefficient", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("coefficient", fieldItemNumber);
fout.println("coefficient");
fout.print(" ", fieldDitem);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("without totals", fieldItemNumber);
fout.print("with totals", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print("without totals", fieldItemNumber);
fout.println("with totals");
double[] newRawAlpha = new double[this.nItems];
double[] newStandardizedAlpha = new double[this.nItems];
double[] newRawRho = new double[this.nItems];
double[] newStandardizedRho = new double[this.nItems];
for(int i=0; i<this.nItems; i++){
int index = i+1;
double[][] newScore1 = this.deleteItem(index);
Cronbach cr = new Cronbach();
cr.enterScoresAsRowPerPerson(newScore1);
double rawAlphaD = cr.rawAlpha();
newRawAlpha[i] = rawAlphaD;
double rawMeanRhoWithTotalsD = cr.rawAverageCorrelationCoefficientsWithTotals();
double[] rawPersonTotalsD = cr.rawPersonTotals();
double rawRhoAgainstTotalsD = Stat.corrCoeff(rawPersonTotalsD, this.scores0[i]);
double rawMeanRhoWithoutTotalsD = cr.rawAverageCorrelationCoefficients();
newRawRho[i] = rawRhoAgainstTotalsD;
double standardizedAlphaD = cr.standardizedAlpha();
newStandardizedAlpha[i] = standardizedAlphaD;
double standardizedMeanRhoWithTotalsD = cr.standardizedAverageCorrelationCoefficients();
double[] standardizedPersonTotalsD = cr.standardizedPersonTotals();
double standardizedRhoAgainstTotalsD = Stat.corrCoeff(standardizedPersonTotalsD, this.scores0[i]);
double standardizedMeanRhoWithoutTotalsD = cr.standardizedAverageCorrelationCoefficients();
newStandardizedRho[i] = standardizedRhoAgainstTotalsD;
fout.print(this.itemNames[i], fieldDitem);
fout.print(Fmath.truncate(rawAlphaD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(rawRhoAgainstTotalsD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(rawMeanRhoWithoutTotalsD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(rawMeanRhoWithTotalsD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(standardizedAlphaD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(standardizedRhoAgainstTotalsD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(standardizedMeanRhoWithoutTotalsD, trunc), fieldItemNumber);
fout.print(Fmath.truncate(standardizedMeanRhoWithTotalsD, trunc), fieldItemNumber);
fout.println();
}
fout.println();
fout.print("No item deleted", fieldDitem);
fout.print(Fmath.truncate(this.rawAlpha, trunc), fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(Fmath.truncate(this.rawMeanRhoWithoutTotals, trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawMeanRhoWithTotals, trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedAlpha, trunc), fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedMeanRhoWithoutTotals, trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedMeanRhoWithTotals, trunc));
fout.println();
// output a deleted item data file
this.deletedItemDataFile(newRawAlpha, newRawRho, newStandardizedAlpha, newStandardizedRho);
int fieldInd = 12;
fout.println("INDIVIDUALS - raw data");
fout.print("person", fieldInd);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.println("total");
fout.print(" ", fieldInd);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println(" ");
int fieldScore = 0;
for(int i=0; i<this.nItems; i++){
for(int j=0; j<this.nPersons; j++){
int sl = Double.toString(scores0[i][j]).length();
if(sl>fieldScore)fieldScore = sl;
}
}
fieldScore++;
if(fieldScore<fieldItemName)fieldScore = fieldItemName;
for(int i=0; i<this.nPersons; i++){
fout.print((this.personIndices[i]+1), fieldInd);
fout.print(Fmath.truncate(this.rawPersonMeans[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawPersonStandardDeviations[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawPersonMinima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawPersonMaxima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawPersonRanges[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawPersonTotals[i], this.trunc));
}
fout.println();
fout.println("scores:");
fout.print("person ", fieldInd);
for(int i=0; i<this.nItems; i++)fout.print(this.itemNames[i], fieldItemNumber);
fout.println();
for(int i=0; i<this.nPersons; i++){
fout.print((this.personIndices[i]+1), fieldInd);
for(int j=0; j<this.nItems; j++)fout.print(Fmath.truncate(this.scores1[i][j], this.trunc), fieldItemNumber);
fout.println();
}
fout.println();
fout.println("INDIVIDUALS - standardized data");
fout.print("person ", fieldInd);
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.println("total");
fout.print(" ", fieldInd);
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println(" ");
for(int i=0; i<this.nPersons; i++){
fout.print((this.personIndices[i]+1), fieldInd);
fout.print(Fmath.truncate(this.standardizedPersonMeans[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedPersonStandardDeviations[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedPersonMinima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedPersonMaxima[i], this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedPersonRanges[i], this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedPersonTotals[i], this.trunc));
}
fout.println();
fout.println("scores:");
fout.print("person ", fieldInd);
for(int i=0; i<this.nItems; i++)fout.print(this.itemNames[i], fieldItemNumber);
fout.println();
for(int i=0; i<this.nPersons; i++){
fout.print((this.personIndices[i]+1), fieldInd);
for(int j=0; j<this.nItems; j++)fout.print(Fmath.truncate(this.standardizedScores1[i][j], trunc), fieldItemNumber);
fout.println();
}
fout.println();
fout.println("ALL SCORES - raw data");
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.println("overall");
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println("total");
fout.print(Fmath.truncate(this.rawAllResponsesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawAllResponsesStandardDeviation, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawAllResponsesMinimum, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawAllResponsesMaximum, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.rawAllResponsesRange, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.rawAllResponsesTotal, this.trunc));
fout.println();
fout.println("ALL SCORES - standardized data");
fout.print("mean", fieldItemNumber);
fout.print("standard", fieldItemNumber);
fout.print("minimum", fieldItemNumber);
fout.print("maximum", fieldItemNumber);
fout.print("range", fieldItemNumber);
fout.println("overall");
fout.print(" ", fieldItemNumber);
fout.print("deviation", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.print(" ", fieldItemNumber);
fout.println("total");
fout.print(Fmath.truncate(this.standardizedAllResponsesMean, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedAllResponsesStandardDeviation, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedAllResponsesMinimum, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedAllResponsesMaximum, this.trunc), fieldItemNumber);
fout.print(Fmath.truncate(this.standardizedAllResponsesRange, this.trunc), fieldItemNumber);
fout.println(Fmath.truncate(this.standardizedAllResponsesTotal, this.trunc));
fout.println();
// close output file
fout.close();
}