Now Playing: Data Type and Format (4:46)
In this tutorial we’ll explain how to use the data type and format properties in the NCSS Column Info Table. The column data type determines how data in the Data Table will be stored, interpreted, and displayed in output reports and plots. In contrast, the column format only affects how a value is displayed in the Data Table, not in reports and plots. The formatting of numeric values in reports and plots is controlled within each procedure.
There are three possible NCSS data types: General, which consists of Numeric and/or Text values, Text, and Date-Time. Each is useful in certain scenarios. We suggest you use the Data Type and Format Editor tool to specify the Data Type and choose a display format for columns in your dataset. General is the default data type in NCSS. When using the General data type, data may either be text or numeric. Dates are treated as text values and are treated as missing values by most numeric routines. The actual appearance of the data values on the data table depends on the format statement. By default, numbers will be displayed with up to 11 digits, depending on the column widths. Use the Data Type and Format Editor tool to change the display formatting of data on the data table. Point and click options make this very simple. If you want, you can edit the format statement directly on the Column Info table. See the Format section of the Data Window help documentation for a complete list of formatting syntax rules and examples. Regardless of the display format, the actual sixteen-digit numbers are always stored with the dataset and used in calculations.
The Text data type is useful when you have large numeric identification values that you do not want converted to 16-digit floating-point numbers. For example, if a very long numeric value with more than 16 digits is entered into a column whose data type is General, it is converted to the maximum floating-point representation possible for that number. Some of the digits are removed because a floating point number can only store up to 16 digits. The same value entered into a column with data type equal to Text will maintain the all of the digits because it is stored as a text value. You should be careful when changing the data type of a column that already contains data, since some of the information may be lost during the conversion. If you convert a column by mistake, use the undo function to recover the original data. If you try to convert it back by changing the data type, the resulting column might be missing some of the original information.
Numeric text values are always interpreted as numbers in transformations and data analysis calculations. There is no special formatting for text values. The Date-Time data type is useful when you want to format numeric values as dates. Date-Time values are considered numeric in transformation and numeric data analysis calculations. Data values in Date-Time data columns are still stored with 16-digit floating point accuracy. By default, dates are formatted and displayed as a “short date”, which depends on your computer’s language setting. This display format setting can be changed using the editor tool.
Variables whose data type is date-time will be formatted as dates in graphs like the scatter plot, where the dates are used as labels. Use the options exposed by the plot format button to change the formatting of the actual date values on the plot.