Automatic inference of measeurement level works.
[pspp] / doc / language.texi
index fd42fb2f815c13bb9142bd4b1862f1dba6ef6978..7b750eb7ae75ac3acf8053184aaacded62fc97a2 100644 (file)
@@ -509,6 +509,7 @@ Similar to print format, but used by the @cmd{WRITE} command
 
 @cindex measurement level
 @item Measurement level
+@anchor{Measurement Level}
 One of the following:
 
 @table @asis
@@ -536,6 +537,45 @@ attached, such as age in years, income in dollars, or distance in
 miles.  Only numeric variables are scalar.
 @end table
 
+Variables created by @cmd{COMPUTE} and similar transformations,
+obtained from external sources, etc., initially have an unknown
+measurement level.  Any procedure that reads the data will then assign
+a default measurement level.  @pspp{} can assign some defaults without
+reading the data:
+
+@itemize @bullet
+@item
+Nominal, if it's a string variable.
+
+@item
+Nominal, if the variable has a WKDAY or MONTH print format.
+
+@item
+Scale, if the variable has a DOLLAR, CCA through CCE, or time or date
+print format.
+@end itemize
+
+Otherwise, @pspp{} reads the data and decides based on its
+distribution:
+
+@itemize @bullet
+@item
+Nominal, if all observations are missing.
+
+@item
+Scale, if one or more valid observations are noninteger or negative.
+
+@item
+Scale, if no valid observation is less than 10.
+
+@item
+Scale, if the variable has 24 or more unique valid values.  The value
+24 is the default and can be adjusted (@pxref{SET SCALEMIN}).
+@end itemize
+
+Finally, if none of the above is true, @pspp{} assigns the variable a
+nominal measurement level.
+
 @cindex custom attributes
 @item Custom attributes
 User-defined associations between names and values.  @xref{VARIABLE