Site menu:

Continuous Norming with RNew: Continuous Norming with R (cNORM)
R package for generating continuous test norms in psychometrics and biometrics and for analyzing the model fit


Java-Implementation of Normal Rank Transformations



This page is deprecated! It of course still works, but use at your own risk. Preferably, you might want to have a look at the R package cNorm , currently under development.



When computing norm tables for psychometric tests or analysing data, often the problem of non normally distributed data arises. A way to compensate for this problem is to transform the raw values by normal rank transformation into normally distributed values. This transformation is based on the conversion of raw values into relative ranks and retrieving the inverse cumulative normal distribution value for it. The small library is doing these calculations for you: It takes a dataset with raw values, containing the data of one or more different samples, determines the relative values and calculates the normal values. There are different ranking algorithms: Blom (1959), Rankit (Chambers, Cleveland, Kleiner & Tukey, 1983), Tukey (1962) and van der Warden (Lehmann, 1975). Additionally, it includes functions for calculating the inverse cumulative normal distribution, the cumulative normal distribution and the densitiy function. It can be used for calculating z standardised values, T values and percent ranks.

Der Code is available under Lesser General Public License (LGPL). You can use it freely in commercial and non commercial applications, as long as you do not modify the code and point to this web site. You are wellcome to send hints and additional code. The jar-file includes the java source code:

And finally, for your convenience, direct links to the source code java files:



Java-Implementierung der Normalrangtransformation

Bei der Generierung von Normwerttabellen oder der Analyse von Daten ergibt sich häufig eine Verletzung der Normalverteilungsannahme, die für viele statistische Verfahren notwendig ist. Bei einer Normalrangtransformation werden die Rohwerte zuerst in relative Ränge umgewandelt und anschließend über eine inverse kumulative Normalverteilung in Standardwerte umgewandelt. Die kleine Java-Bibliothek vereinfacht diesen Prozess und ermöglicht es, für ein Datenset mit Rohdaten, automatisch die relativen Ränge und auch die empirischen T-Werte zu berechnen. Sie enthält Algorithmen zur Berechnung der relativen Ränge auf der Basis von Blom (1959), Rankit (Chambers, Cleveland, Kleiner & Tukey, 1983), Tukey (1962) und van der Warden (Lehmann, 1975). Daneben umfasst es Funktionen zur Berechnung der inversen kumulativen Normalverteilung, der Umrechnung von relativen Rängen und Prozenträngen in T- und z-Werte und der Berechnung der Dichtefunktion der Normalverteilung.

Der Code ist unter der Lesser General Public License (LGPL) verfügbar, d. h. Sie könne ihn frei in kommerziellen und nicht-kommerziellen Anwendungen verwenden, sofern die Urheberschaftshinweise im Code erhalten bleiben. Kommentare, Hinweise und Ergänzungen zum Code sind herzlich willkommen. Die jar-Datei enthält den Source-Code, der frei unter den Bedingungen der LGPL genutzt werden kann:

Und schließlich, für Ihren Komfort der direkte Link auf die einzelnen Source-Code-Klassen:



Continuous Norming with RNew: Continuous Norming with R (cNORM)
R package for generating continuous test norms in psychometrics and biometrics and for analyzing the model fit




This page is deprecated! It of course still works, but use at your own risk. Preferably, you might want to have a look at the R package cNorm , currently under development.



Live Demo: Online Normal Rank Transformator

Here you can find the code in action and use it for transforming raw values for one or more samples into percent ranks / relative ranks and empirical T values that are normally distributed with m = 50.0 and sd = 10.0.



Usage / Anwendung

The usage is quite simple and straight forward: First, just throw an int array of data into the RankConverter and retrieve the empirical T values and relativ ranks. What is more, you can provide an additional int array for group membership, in case, there are different samples in the data set. Please read the Javadoc for further information.

Example:


	/**
	 * Small demo for using the library
	 * 
	 * @param args
	 *            No arguments necessary
	 */
	public static void main(String[] args) {
		System.out
				.println("This function serves as a demo for the
				          usage of the small library.");

		// easiest case: One sample and raw data: you need the raw values
		int[] rawValues = { 1, 2, 3, 2, 3, 4, 4, 5, 5, 4, 5, 6, 1, 4, 3, 2, 3,
				4, 5, 6, 7, 8, 6, 7, 5, 6, 7, 8, 9, 10 };
		RankConverter rc = new RankConverter(rawValues);

		double[] tValues = rc.getEmpiricalTValue();
		double[] ranks = rc.getRelativeRank();

		System.out.println("Raw Values\tRelative Ranks\tT Values");
		for (int i = 0; i < rawValues.length; i++) {
			System.out.println(rawValues[i] + "\t" + ranks[i] + "\t"
					+ tValues[i]);
		}

	}


Output:

This function serves as a demo for the usage of the small library.
Raw Values	Relative Ranks	T Values
1	0.0371900826446281	32.15732231306099
2	0.11983471074380166	38.24186527785528
3	0.23553719008264462	42.79267935517771
2	0.11983471074380166	38.24186527785528
3	0.23553719008264462	42.79267935517771
4	0.384297520661157	47.05786861394565
4	0.384297520661157	47.05786861394565
5	0.5495867768595041	51.24617407970496
5	0.5495867768595041	51.24617407970496
4	0.384297520661157	47.05786861394565
5	0.5495867768595041	51.24617407970496
6	0.6983471074380165	55.196525208485326
1	0.0371900826446281	32.15732231306099
4	0.384297520661157	47.05786861394565
3	0.23553719008264462	42.79267935517771
2	0.11983471074380166	38.24186527785528
3	0.23553719008264462	42.79267935517771
4	0.384297520661157	47.05786861394565
5	0.5495867768595041	51.24617407970496
6	0.6983471074380165	55.196525208485326
7	0.8140495867768595	58.92918486013117
8	0.8966942148760331	62.62937697749207
6	0.6983471074380165	55.196525208485326
7	0.8140495867768595	58.92918486013117
5	0.5495867768595041	51.24617407970496
6	0.6983471074380165	55.196525208485326
7	0.8140495867768595	58.92918486013117
8	0.8966942148760331	62.62937697749207
9	0.9462809917355371	66.09816065580308
10	0.9793388429752066	70.40281320754289