Products

Archive | Output

SPSS or SAS or PSPP or … and CANDAT

SPSS, SAS  (or other good statistical packages) is used to process Candat calculations into results for your scientific report.

At its most detailed Candat will produce data files consisting of:

  • Subject code
  • Date
  • Day of Week code (0-6, where 0 is Sunday)
  • Food Group code
  • Meal code
  • Food code
  • Food description
  • Nutrient variables (Weight of foods and all nutrients you selected at reporting)

The printed (text or PDF) file (hopefully you did not print to paper) can have all of the above information as well as basic statistics (for a quick perusal, not meant to be used instead of a statistical package).

Candat also produces computer readable files that can be directly read into statistical packages or spreadsheet software (such as Excel or Open or Libre Office Calc or ….) . . Your study will probably want to make use of daily average intake data, as representative as possible of your subject’s usual intake.

Where you have days of the week and weekend days you will probably want to make use week-weighted average daily intakes, where weekend days carry less weight than week days. These week-weighted averages are calculated in Candat but should be re-calculated in the statistical package so that you can make use of the proper variance calculations for weighted data.

Systematically then here are the procedures to follow for managing your data:

  • Generate the data in Candat you need in a compact way. If you are not interested in data by meals or by food group or at the food detail level, leave those out of the Candat calculation.
  • Read the Candat generated file into a statistical package
  • Identify missing data as -1 (the Candat value at the food level. In Candat summaries (means) missing values are considered a zero. This makes sense because food databases do not spend much time analyzing nutrients that are not likely to exist in the food but they do not report them as having a value of zero (usually).
  • Convert the Day of Week code to a weight to be used in week weighted calculations. In Candat we use 5 for codes 1 to 5 and 2 for codes 0 and 6.
  • Weight the cases using the converted Day of Week variable
  • Aggregate the cases. In most cases you will want to aggregate the data using Subject code and Date code as independent variables, an average weight code for the weighting variable (average will maintain the weight code for the day)  and sum (which adds up all the contributions for that day) for the nutrient variables. At this point your data is ready for statistical processing.
  • Apply exploratory statistics to all your variables and make sure the data seems reasonable
  • Merge the data variables that identify your subject variables. This may be from a file produced externally from Candat or from the Candat Description file.  In either case you must make sure to merge on the Subject codes.
  • Compare your subjects to your control groups (subject variables) using statistical procedures and save the results.

Report these results, write the other sections of the paper and you are done.

 

Output to save files

Reports that are the result of nutrient calculations can be output to files that you can either open with a word processor or import into a spreadsheet environment (like Excel) or adatabase environment (like SAS, SPSS or other statistical package) . You are prompted for a file name and different files are created using those names in your user save area. Use eight characters only for file names, no spaces and no special characters. CANDAT will append various extensions to these files so that they are readily identifiable. All such files will be created in the user folder, sub-folder save,  identified at CANDAT installation.

Output to text files

Most of the reports in CANDAT which can print on paper can also print to files. You are prompted for the file name and the file is created in your user area. Use eight characters only for file names, no spaces and no special characters. CANDAT will append an extension of .TXT to these files so that they are readily identifiable. All such files will be created in the user folder identified at CANDAT installation.

You have a choice of printing with printer control codes or not. Printing without control codes makes the assumption you will be importing the information into a word processing or other type of program using “cut-and-paste”. Titles and headers are then also not printed. If you wish to print to file with titles and headers and no control codes, specify printer type “none” and print to files specifying control codes. The “none” printer type does not output printer control codes.

Reports

Printing reports

Reports produced by CANDAT can be sent to a printer, a file or, in the case of subject calculated data (task 340), to documented files. CANDAT is configured to print to LPT1 (or text files if you wish). The printer definition within CANDAT which ensures printing to LPT1 is called PRNTLPT1. It can be set in Activate System Utilities menu, under Activity Options menu. Activity Options is available as a menu item in each Module or Task selection menu as well as in the Task startup menu.

In order to use your Windows printers you need a software such as DOS2USP which captures the LPT1 port.  It can be obtained here as a trial version and as a permanent version for a very low cost. The advantage of printing to Windows printers is that you can create PDF files from CANDAT output and be better able to manage the large volumes of data produced by CANDAT.

Paper definitions

CANDAT uses paper size to layout reports for printing. Paper size is a menu item under Activity Options (see above). Paper size is always defined in portrait mode, even if you wish to print in landscape mode (sideways). CANDAT determines the size of the report in relation to the size of the paper available. A few reports cannot print on paper 8.5 in. wide. These reports need to be printed on wider paper or need to be printed in landscape mode. When CANDAT detects this situation, it prompts you to change your paper definition so that it can continue. You must then switch to landscape (if you have landscape capabilities on your printer) or specify wider paper.

Printer definitions

The DOS2USB program allows you to define the print device (which can be a .PDF file), the font and the font size to use for the report. This printer definition works in conjunction with CANDAT to provide the printed (or visual) representation of the reports. CANDAT defines the width of the report and the length of the pages based on its paper definition (see above). DOS2USB makes this definition fit on a page or on the screen.

Most of the reports in CANDAT are presented in a table form. A fixed font (such as Courier New) is preferable as it uses characters that are all the same width. An “M” has the same width as an “I”. A “1” has the same width as a “0”. This allows columns of data and numbers within these columns to line up properly and be easier to read.  Font size is set here too. Please note that these sizes are in CPI (Characters per inch) and not in dots per inch as in windows. A larger CPI results in smaller characters and vice versa.  A bit of experimenting with the paper setups of CANDAT and the printer setups of DOS2USB will have you producing beautiful reports very quickly. A suitable setting is shown here.

call: +1 (877) 977-2664 (toll free)