Concepts {r2lUniv}R Documentation

Concepts

Description

Here are some basic statiscal concepts used by r2lUniv. Just to be sure we are speaking about the same things...

r2lUniv basic classes

Classically, statistics divide variables in four types. The classification is made according to some mathematical properties: 1) Are arithmetic operations possible? 2.a) Is there a natural order? 2.b) How many observations is there?

  1. Nominal: They have no mathematical properties. Example: [Name] or [Sex]. One cannot say that (Peter)<(John) or we cannot add (Peter) and (John)
  2. Ordinal: They can be ordered, but arithmetic operations are not possible. Example: [Pain] in {(Medium), (Low), (Strong)}. We have (Low)<(Medium)<(Strong), but (Low+Medium) / 2 makes no sense.
  3. Discrete: They can be ordered, arithmetic operations are possible but observations are only integer and there are only a few possible observations. Example: [childNumber]: (2) is less than (3), (2+3)/2 = 2.5 makes sense but a woman can not have 2.5 children.
  4. Continuous: They can be ordered, arithmetic operations are possible and observations are any numbers. Example: [Weight]. (13.5) is more than (12.8), (13.6+12.8)/2 = 13.2 makes sense and (13.2) is a possible weight.

r2lUniv basic analyses

Due to these mathematical differences, statistical analyses and graphical representations of variables differ:

  1. Nominal: Frequency. Graph: barplot.
  2. Ordinal: Frequency and quartile. Graph: barplot.
  3. Discrete: Frequency, mean, variance, quartile. Graph: boxplot and barplot.
  4. Continuous: Mean, variance, quartile. Graph: boxplot and histogram.

R classes

R classification is close to the r2lUniv basic classes but minor differences exist:

  1. R distinguishes two kinds of nominal: the logical and factor.
  2. R does not detect ordinal variables, the user has to precise them.
  3. R does not make differences between Discrete and Continuous (how could it? Even for human being, this distinction is not obvious...)

Why does r2lUniv not use R classes?

r2lUniv asks R to perform automatically some analyses. The variable [childNumber] deserves a barplot and not a histogram whereas it is the opposite for [Weight]. For R, both of these variables are numeric. So to get to an automatic treatment, r2lUniv needs to set the class of [NumberOfChild] to Discrete and the class of [Weight] to Continuous.

Mapping between r2lUniv and R classes

Here is a summary of the mapping of R classes into r2lUniv basic classes:

LaTeX summary

r2lUniv asks R to perform automatically some analyses, then generates a LaTeX code to be included in a document. This LaTeX code is called LaTeX summary.

Author(s)

Christophe Genolini christophe.genolini@free.fr
INSERM U669, PSIGIAM
Paris Sud Innovation Group in Adolescent Mental Health

Jean-Marc Chamot (English correction)
UFR STAPS, Universite Paris X - Nanterre


[Package r2lUniv version 0.9 Index]