Archive | Course

How to perform various tasks needed to do research for food consumption.

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.


Week-weighted Averages in CANDAT

When expressing and comparing results of multi-day (3 day commonly) food recalls one tends to use the average daily intake as a measure of a subject’s intake. Of course, 7 day recalls will give more accurate estimates of this daily intake and the accuracy will increase if all the days of a week are used. The assumption here is that subjects will eat differently on different days with the greatest variability been between week days and weekend days.

Rather than simply computing an average daily intake one may get more accurate results by weighting the days of the week and the weekend days differently.

A weight of 5 for each week day and a weight of 2 for weekend days should allow us to calculate week-weighted averages for any number of recalls. Of course, for recalls without weekends this would just be a day of the week average and vice-versa.

The week-weighted average could be calculated as follows:

xw = (∑ wi × xi) ÷ ∑ w

where xw is the weighted average with  xi as the daily intakes, and i is 1 – 5 (codes for days of the week) or 0,6 codes for weekend days corresponding to Sunday and Saturday respectively. w1-5 would then be 5 and w0,6 would be 2.

with a variance of

Var(xw) = Var(x) × ((∑ wi2) ÷ (wi)2)

where Var(x) would be the variance over all the days of the food intakes for the subject.

Essential CANDAT information

This section explains the CANDAT software environment. You need to have a feeling for the following three areas:

  1. Navigating CANDAT, how to get to and start the tasks;
  2. How to respond to typical prompts within the task:
    1. for selecting database files;
    2. for selecting individual records within those files;
    3. for printing;
  3. The computer structure of folders and sub-folders that support CANDAT

CANDAT Environment (GRASP)

GRASP (General Reporting and Application Support Package) is an environment which contains standard mechanisms for communicating between the user and the computer. This allows for consistency within applications and is the background within which CANDAT is defined.

GRASP assumes a well defined user area on the disk (usually created at installation) and a structure of modules and tasks. Modules identify broad areas of functionality. There are modules for food files, nutrient tables, category (food group) definitions and RNI tables, subject files, recipe files, food frequency (history) questionnaires, and file maintenance utilities. Tasks define the functianlity of CANDAT and together, define the tasks required for food intake research.

The basic functional unit of an application is the task. There is a two level menu structure that directs the user to the task required. The first level lists general areas of the application., the second lists the tasks. We will use CANDAT as an example application to show menus. The first and A second level menu of CANDAT are shown here:

menu main 4

menu recipes

To choose a particular item in a menu just cursor down to that item and press Enter or type the first character ot the item. In this case, the “4” was pressed which immediately brought up the Recipe menu. Pressing Enter on the first item in the Recipe menu, in this case 400  Recipe file maintenance, essentially Task400 in the CANDAT system, would activate that task and bring up the following menu, a menu common to all the tasks.

Task startup menu

Once a task has been chosen and it has been read in by the computer, the following menu is displayed:

Activity options

At the end of a task, the same menu appears again. You can choose at this point to restart the task by choosing the first option again.

There are two ways to exit from CANDAT. One is temporary and leaves CANDAT in memory, ready to be reactivated. This is the EXIT to DOS choice. To return to CANDAT after choosing this alternative, simply type EXIT from within DOS and you will be returned to CANDAT. Do not try to start a new session of CANDAT if you exited this way. You will quickly use up all of your memory and may not be able to start another session if you do so. If you choose QUIT and return to the operating system, CANDAT is released from memory and terminates normally.

Data entry prompts

CANDAT prompts you for information in the form of a list of choices or tables. Lists are referred to as menus, not to be confused with menus used in restaurants. CANDAT will also prompt you for single field entries as in food codes, date of recalls, etc. An entry of a blank code or a 0 serves to cancel the prompt.

  1. There are three kinds of menus presented in CANDAT.
    1. The usual menu is a list of items. You are expected to make a single choice. That is done by moving the selection bar (cursor) to the choice and pressing the enter key. Another way of accomplishing the same thing is to enter the first letter or number of the choice. Pressing the Esc (escape) key chooses the last item in the list or exits menu selection without making a choice.
    2. Another menu type gives you a series of Yes/No items which you toggle by pressing the Y or N keys. You can also make all the choices Y or all N by pressing the Alt key with your selection of Y or N.
    3. The third menu selection consists of a single field at the bottom of the screen. This field usually expects a record key (in the case of a food database, this would be the food code, in the case of a recipe database, this would be the recipe code). The F6 key, found in the row of F keys at the top of your keyboard, serves as an information key. Pressing it will give you various options, from a simple list of codes that you can enter in the field to a search bar in which you can put keywords that are found in the description of the item. In either case you can choice the desired item from the list of items that appears and the proper code will be entered in the field automatically. Keyword searches are very simple. If you put in two keywords, seperated by a space, both must be present in the description in order for the search to be successful. If you wish one item or the other or both, seperate the keywords with a comma.
  2. There are two kinds of table entry in CANDAT.
    1. The usual table entry allows you to enter information within each cell of a table. Some cells will only allow numbers, others, both numbers and characters. Whichever is allowed will be obvious from the context. If you try to enter a character and it does not appear in the cell, the cell is probably expecting a number. Blank cells are considered filled with characters and you will not be allowed to move out of a number cell until you insert a number. A 0 is usually sufficient. If this entry resulted in an extra line being added to the table, it can usually be removed using Alt F4 (see below). Some of these tables grow automatically as you try to enter another row. Pressing the Enter key in the last cell of the last row of a table activates this feature. You cannot simply move to a row that does not exist by using cursor controls. Other rows can be inserted and deleted in these “growing” tables by using Alt F3 to add lines and Alt F4 to delete lines. To exit after having entered your information, press the Esc key. You can move from cell to cell by pressing Tab (or back Tab) and by using the cursor control keys. You can also use Ctrl Home and Ctrl End to go to the first and last cells respectively. In some contexts the function keys F1 and F6 will provide you with additional information which is just shown (in the case of F1) or serves as input based on your choice in the case of F6.
    2. The other type of table entry allows editing of a full line at a time. This is a free form type of entry. and you need to be careful of the layout of the information as it is not controlled by the software. To exit after having entered this information you must press Ctrl E or Ctrl Q. Ctrl E will save your entries, Ctrl Q will quit without saving your entries. CANDAT has very few of these types of table entry.

Printing reports

Reports produced by CANDAT can be sent to a printer, a file or both and, 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. This is explained in more detail under those menus.

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. A configuration of that program which works well with CANDAT is shown here:


Once installed and these settings defined (do not forget to click on Save Settings) you can forget about the DOS2USP program. It will always be on your computer, will start when you start Windows and will just be used with CANDAT or some other DOS program you may have on your computer. Set it up once and forget about it.

Paper definitions

CANDAT uses paper size to layout reports for printing. Please note that this paper size is independent from the one above. 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 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.

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 (see Structure – Users, below). 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.

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.

Structure – Users

CANDAT is licensed on a per computer basis. CANDAT may be installed on only those computers and networks for which it is licensed. It is possible for multiple users to use CANDAT simultaneously when installed in a network. You are only allowed the number of simultaneous users negotiated in your purchase agreement.

Any one license (on one computer) can and is allowed to support any number of users. Users are created within CANDAT using a NEWUSER2 creation process. This process creates a folder for the user, specific to the disk (memory stick or other USB device) drive specified at creation. Note that CANDAT records the drive on which the user is created. Users must function on the drive specified at creation in order for CANDAT to be able to function properly. This is particularly important in a laboratory structure where users may connect their memory sticks to a USB port and create their own environment. CANDAT creates an icon with the particulars of the user drive. A user can manually change the drive in the properties of this icon to correspond to the drive of their memory stick, if used on another computer. For instance, a user could create an environment on their memory stick under the  “F” drive in the laboratory environment and then need to use it on the “G” drive of another computer.

User folders store food files, category files, subject files, questionnaire files, save files, and recipe files.  For a user to use another user’s files, those files must be copied to the relevant user folder. There is no user identification on the files themselves. This structure also allows the same (project) name to be used for each of the food, category, subject, etc. files. Please note that the user structure and files is never deleted by CANDAT or by re-installation of CANDAT. It is always prudent, however, to fully backup the user structure and its files.

Structure – Modules and Tasks

CANDAT has a unique structure for Users and for Food files. The actual work performed by CANDAT is organized in a structure of Modules and Tasks.

Modules identify broad areas of functionality. There are modules for food files, nutrient tables, category (food group) definitions and RNI tables, subject files, recipe files, food frequency (history) questionnaires, and file maintenance utilities.

Tasks are found within modules and provide the detailed interaction with the User. It is within tasks that subject data is entered, recipes and food files are created, nutrient data is calculated, reports are produced, etc. The titles of the modules are self explanatory as are the titles of the tasks. Follow the prompts within the tasks and you should be able to accomplish your work with ease.


A good software application is required to support all of the steps listed in this Course. This course was created based on the steps available in the CANDAT software found on this page.

As more and more articles are added to this course it will become evident that good software is absolutely necessary. Good software allows for the collection of good data. Good software then allows you to change study parameters, look at different aspects of the data and this, without manual recalculations or re-entry of data.

Good software will also allow you to export all relevant calculations so they can be integrated in a general statistical package. There you will see the effects of your nutrient calculations on your population health or disease values.


Recipe – Validation

One of the purposes of creating recipes is to be able to calculate their nutrient profile. If you were doing this manually you would look for the nutrient profile of each ingredient and sum each ingredient’s nutrient contribution. From this you would get an estimate of the recipe’s nutrient profile.

Validating a recipe is a step that ensures, in an automated system, that all ingredients are present in the food database. The nutrient calculation of the recipe can then proceed automatically. Validation will report either that the ingredient does not exist or that the units used to quantify the ingredient are not valid. In either case one must correct the mistake before instructing the program to calculate the recipe values.

Recipe – management

A database of recipes needs to be managed. Management means the following:

  • Being able to list the recipes (simple code and description only)
  • Being able to list the recipes with contents. This allows verification of information entered to ensure accuracy
  • Being able to copy recipes to other recipe databases to save re-entry
  • Being able to delete recipes no longer relevant
  • Being able to copy a recipe into another recipe. This allows creating variations on a recipe without having to re-enter all the duplicated information

This management is best done by computer programs. Recipe database files can then be easily stored, backed-up and shared with others.

Recipe – Input

There is more to recipe input than just entering the ingredients and their quantities. Below is a list of requirements to define recipes. (R) indicates a required item, (O) indicates an optional item but useful if you are going to be creating a large collection of recipes for many purposes.

  • (R) A recipe database. If a database does not exist, it must be easy to create one.
  • (R) Recipe code. The unique identification for the recipe. One can build in some information in this code, for instance, all 100 recipes could be salads, all 500 recipes could be deserts, etc.
  • (R) Recipe description. This is the name of the recipe.
  • (R) Ingredients. A list of ingredients with quantities. Each ingredient is a food code from the active food database. Quantities of each ingredient are specified in grams.
  • (R) Number of servings. How many servings does this recipe produce.
  • (R) Serving size. This can usually be derived from the sum of the ingredients weights and the number of servings. If the recipe loses moisture in cooking the serving size will not be correct and an actual serving size will need to be inserted.
  • (O) Preparation. A description of how to prepare the recipe. This is only needed if one is creating recipes for others to use. It is not required for the calculation of nutrients.
  • (O)Many other attributes could be collected for recipe documentation, such as remarks; a couple of hints lines; where the recipe is used; its main product, its product group, its type,  its density, various dates such as date created, tested, analyzed, converted and preparation time.

This defines a single recipe which then becomes a single entry in the database.

Task 400 – Recipe Maintenance

This task begins by prompting for the file name. Files that exist already will be listed and the one desired selected. If the new… choice is selected a new file name needs to be entered. New file names must start with a letter, have no spaces within the name and have 8 characters (letters or numbers) or less.

Recipe files can contain the definition of many recipes. Each recipe is identified by a code of up to 7 digits. As recipe files may eventually be converted to foods it is a good idea to use the same convention for their codes as are used for food codes.


A food code is entered here. If the code exists already, the next prompt will be the options prompt where the recipe information can be modified. Otherwise a message will appear prompting for the creation of a recipe. Again, the options prompt will appear allowing the entry of recipe information.



The various parts of a recipe can be defined using the recipe options listed here. The ingredient editing options change the same ingredient data, there are two ways of editing these for convenience.


Attributes define a recipes profile. There can be two preparations for each recipe to be used as desired. Some will use preparion one for imperial units and preparation two for metric units. Some will use preparation one for a recipe with a small number of servings and preparation two for a much larger number of servings. Each preparation has its own profile and its own quantities for each ingredients. Other uses of preparations are up to the imagination and needs of the user. Of course, a single preparation can be used as well.

The fields defining a recipe are as follows:

  1. Recipe name: A description for the recipe. Remember this will also be used as a description for the food if the recipe data is ever converted to a food.
  2. Remarks: Any remark specific to this recipe. It serves as additional documentation to the recipe and is not used in conversion to a food and is an optional field.
  3. Hints line 1::Any hint specific to this recipe. It serves as additional documentation to the recipe and is not used in conversion to a food. Also an optional field.
  4. Target % H2O: This is used to compensate for cooking method. The recipe nutrient data will be adjusted to force this % moisture in the final recipe. It consists of a single number like 8.5 or 10 or 33.8, etc.  It this field is not used for target moisture it can be used for additional hint data and is an optional field.
  5. Where used:,Product Group:,Main Product: These are arbitraty and optional descriptions used to further define the profile of recipes. To use these fields as selectors in future report groupings a consistent set of descriptions must be developed and used. 
  6. Number of servings: A number, required to calculate nutrients per serving.
  7. Serving size: Specified in grams. 
  8. Unit of measure: This is always 0, the unit code for grams.
  9. Density: If known, is entered here as a number of grams per 100 ml. Is used in conversion to food. A food with a density can be used with volumetric units.
  10. Dates: The date created is automatically entered here. The other dates are optional and can serve as record keeping to monitor the progress of the recipe through its phases. Dates are entered using the format yyyymmdd.
  11. Recipe Type Code: These codes are arbitraty and optional and can be used as selectors in future report groupings. This requires a consistent set of descriptions to be developed and used 
  12. Preparation Time (mins): A number of minutes, again, used as selectors in future report groupings


Ingredients are inserted and modified using either of the two following panels. Fields describing each ingredient are:

  1. Ingredient code: Ingredient codes come from food files and must exist there before they are used. Food codes for ingredients are found using the F6 information key with a keyword search term. Multiple keywords can be used. If seperated by spaces each keyword must be present, separated by commas, one or the other keyword can be present. The result of the search is a list of foods satisfying the search parameters. Choosing the desired food inserts its code in the ingredient code field.
  2. Unit code: This code is specific to the ingredient and a list of possible codes are accessed using the F6 information key. Choosing the desired unit code inserts its code int he unit field.
  3. Quantity: This is the quantity of the ingredient required for the recipe in “unit code” units.
  4. The E/F and the % Yield fields are not presently used and are reserved. The concept behind the E/F field was as an “each” parameter as in each of the servings would have this quantity of the ingredient. The total quantity of the ingredient would thus depend on the recipe’s profile information.


The above panel consists of multiple lines of entry per ingredient. As you tab from field to field you will see the space highlighted for each.


The above panel consists of a single line of entry per ingredient. Again, As you tab from field to field you will see the space highlighted for each.

The preparation panel is used to describe the preparation of the recipe. It is mostly meant to be used in managing cookbooks and is not used in the conversion of recipes to food codes. It consists of arbitrary text and it too is an optional field.


Once all the data has been entered pressing the Esc key will save all the recipe data automatically and navigate back to the previous step or menu.

Recipes & CANDAT

Recipes are another source of food information. Not all foods can be found in food databases, There is a limitless number of recipes and thus a limitless number of foods. You only need to look at the number of recipe books that are available to have an idea of the number of foods that are possible.

A good study needs to be able to identify commonly used recipes in the target populations and find suitable foods to code for those recipes. Where there are no suitable codes, the ingredients of the recipe need to be identified and a suitable food defined from these ingredients. CANDAT has tools to do this and to manage the consequent data

The following are the two menu selections needed manage the tasks in the recipe module.

This from the main CANDAT menu and

menu main 4

this from the choices then presented:

menu recipes 400

The standard startup choices below are presented after the selection of a task and


are explained in Appendix A (click on the screen to see the explanation). The prompts that follow activating “START the task”  control the options for the task in question and are explained in the appropriate task chapter.

The list of tasks in the task menu area are listed in the order one would use them. More detailed information about each task can be found in that task’s chapter.

  1. 400 Recipe file maintenance – this is where recipes are defined, copied, modified, listed, etc.
  2. 410 Recipe file validation – once recipes have been created this task validates that the ingredients exist and that proper units have been specified for quantities
  3. 420 Recipe nutrient calculations – nutrients are calculated for each recipe and listed on a total and per ingredient basis. Ratings of recipes based on system Recommended Daily Intakes (RDI) are listed here as well
  4. 430 Recipe to food file conversion – to use recipe data as part of subject recalls or even as ingredients in other recipes, they must be made into foods using food files. The foods in these food files can then be used as input to subject data or recipe data and managed like regular food files
  5. 100 Food file maintenance – this task is part of the food files module. It is included here as a convenient link to food files once recipes have been converted to foods
  6. 440 Recipe reports by types – part of the definition of foods has optional fields which define attributes of the recipe. The reports in this task allow listing of recipes that satisfy those attributes.

Recalls and reports

A typical Candat scenario

The navigation shown below is a good example of the navigation available throughout CANDAT. You will get used to using the function keys, particularly the keys “F6”, “F5”, “F1” and “Esc”.

Modules and tasks

The first to appear once Candat is started is the TASK MODULES screen. It contains a list of the modules available in CANDAT. Within each module is a list of tasks, each prefixed with a task number. For example, in module 3. Subject files… you will get a series of 300 level tasks. These tasks are related to subject entry, validation, reporting, etc… but all tasks that have to do with subjects.

You will see 300 related tasks in module 5. Questionnaire definition and input. That is because some of those tasks work with questionnaire data once it has been converted to subject files. Just an added convenience if you happen to be working with questionnaire data.

For now, choose the Subject module so that we can enter a simple recall to see how CANDAT works.

Subject files maintenance and reports

Subject file maintenance


This is where subject data is entered, on a per day, per meal basis. You can also configure general information about this subject file here.

Once you have started the task you may choose a user food file to activate. As you enter food codes this will allow CANDAT to automatically validate foods that may not be in the Master food file or Institute food file.

The next step allows you to select an existing subject file or create a new one.

We have chosen to create a new subject file which we have called “demo”, for the purposes of this tutorial. Please note that subject files can hold an unlimited number of subjects.

When first created we need to know whether this subject file will be used for questionnaires. Questionnaire subject files have a few more components to them. These can also be added later if you wish.

Up to 25 subject variables can be created per subject. This is where you define what those variables are. The variable names will serve to identify the data on reports.


This menu shows you what can be done with subject files. A bit overwhelming at first but necessary as your study evolves and you need to manage more and more of your data. For now we will just concentrate on entering subject recall data.


Candat allows up to 10 characters for a subject code. We have tried to make this a bit meaningful, as you can probably see from the characters. This can also be another place for you to classify the subjects. You must, however, make sure that the code you create is unique.


This is where you would populate the variable data that you defined before. Note that the definitions are specific to the subject file though the variable data changes from subject to subject (of course).

…and now we are able to enter actual food recall information, up to 7 days per subject. Specify the date using yyyymmdd coding. The date is important as Candat uses it to figure out the day of the week in “week-weighted” reports.

This is the main data entry screen for food data. You can also change the date here. A convenient way to navigate this screen is through the tab key and the arrow cursor controls. The “F6” key is especially convenient:

  • in the Meal Code field it will give you a selection of valid meal codes (note that you can define your own meal codes, up to 999 or them!)
  • in the Food Code field it will allow you to search foods. It will insert the code of the food you choose
  • in the Unit Code field it will give you a list of valid units for that food and insert the code of the one you choose

    All you have left to enter is the Quantity. The Food Frequency field is not used in recalls, it is meant for questionnaire data.

The next few screen pictures will show you data at various stages as well as detail information of your input you can see by pressing the “F1” key.



This screen shows a few foods entered for a breakfast. The highlighted area shows the foods that were entered. It was generated by pressing the “F1” key on the date field. It could also have been generated by pressing the “F1” key on the Unit Code field. Pressing the “F1” key on the other fields will translate the code for the information it generates. For example, if pressed on the “1” under Meal Code, it would show “Breakfast”, if pressed on the food code “28730” it would show “Coffee Brewed”.

How do you know which codes to enter? You just use the “F6” key. The “F6” key pressed in the Meal Code field would give you a list of valid meals (the list you defined if you did that). By selecting the meal you wish the code is automatically inserted. Under the Food Code field “F6” generates the same search it did in the Food Profile area above. The selected food has its code inserted. “F6” in the Unit Code field lists all the units valid for that code. Again, selecting the desired unit inserts its code in the right place and generates the description.

Experiment a bit, add a few more code, fill in the day. When you are done simply press Esc to be prompted for another day of entry.

You can continue entering intake dates until you have the maximum of 7 per subject or you can stop at this point by entering a “0” for the date.


A “0” date will bring up the subject editing menu where you can perform other actions on this subject.

When you are done simply press the Esc key repeatedly until you reach the menu to choose another task:

At this point the prompts become intuitive. In a big study we would do a lot of data entry, perhaps even by multiple data entry clerks. Their subject files could be combined, all the data validated using tasks 310 and 330, the nutrient data compiled and reports produced using task 340.

The validation from task 310 is shown here… if we had made entry errors they would appear in the last column. This validation is also a good way of checking against your entry data to make sure the right foods were coded and none were missed.

and then we simply skip to task 340 to show you some of the possible ways of reporting.


Toggle the Options to Yes for those you would like to see in reports. There are many ways of setting your options.

  • “Ctrl Y” selects them all to “Yes”,

  • “Ctrl N” selects them all to “No”,

  • “Y” make a “Yes”

  • “N” makes “No”

  • Just pressing “Enter” changes an entry back and forth.

For this example we will choose them all, “Ctrl Y”

…and press Esc to go to the next screen.

This allows us to select the nutrient we wish to see in the report.

We can add as many nutrients as we wish, pressing “F6” (standard now) on a code field allows us to choose nutrients we want to add. This process is shown below.

Here we have added LUTEIN, nutrient 837, you should see it in your reports, along with the others.

You can also choose to view other data in your reports, you can see the expressions and ratios we have chosen here…

The next few prompts allow you to select the subjects you wish to analyze and other reporting options such as printing, files to save, etc… they are explained below;

As you use Candat the above 4 screen shots will be very familiar to you. They are the standard selection sequence of database records, whether they be subjects (as they are here) or foods, recipes or questionnaires, the main databases used in Candat.

You can choose to sort by one of your selected nutrients, in this case we will leave the first nutrient, protein, as our sorting nutrient. Note that if you sort by nutrient and you view your reports at the food detail level, the foods will not be in the order entered but in the order of the selected nutrient value.

A nutrient report title which will appear on your printed reports…

In Candat you can define your own food groups. Food groups you define are stored in “category” files, each category file containing a list of food groups defined for that category and each food group containing a list of foods. Pressing “F6” here gives you a choice of available category files. Candat comes with the Canadian and USA category files pre-defined.

In this case we will bypass the category file selection by pressing Enter. This will have the effect of cancelling the reporting by food groups we previously selected.


The next few screens ask us for the name of the files to store the results. You can use the same name for each, very convenient as the same name can represent a particular part of your study or some particular purpose for the report, as here, “demo”


At this point Candat produces all the reports, ends the task and provides you with this friendly reminder.

You can then proceed to Start the task again (if you want to produce reports with other options) or choose another task.

View Reports

Of course, once you reach this stage you will probably press the “F5” key to look at your results. We go through this with you in the screens beginning on the next page.

Pressing Enter here lists all the text files (.TXT) and, in this case, gives the only file there.

The menu below is presented when you press the slash (“/”). You can then choose one of the presented options to manage the selected file.

This is the printed results file that was generated by Candat. For the columns to line up properly in external programs the font must be a fixed font, for example Courier New.

This file can be opened with a word processor or a text editor and printed from there if needed. Most of the time these files are not printed. We recently examined a file of 82 subjects and it had over 3,600 pages. That file included each food and showed detail by subject, by day and by meal with a meals summary at the end of each day and a days summary at the end of each subject.

In specifying default printers for CANDAT you can use a printer driver that creates .pdf files directly. This is very convenient as CANDAT allows you to specify very large page sizes which can be viewed in landscape (sideways) mode. If you do not have a .pdf printer driver you can still create this very large .txt file and then convert it using freely available .txt to .pdf converters. One that we have found very useful can be found at

You can then use your favorite pdf reader application to easily browse through all the data.

You scan the .txt or the .pdf files to verify that the data you needed has indeed been generated. Once you are ready to use the data you can access it directly through the files in the SAVE folder. Those files can be imported directly either into a spreadsheet program or in a statistical program. Please see the next pages for examples of those files.

Once you have viewed the text files, you can proceed to the “save” files, the files that you can use to import your data into other programs.

Pressing Enter here give you a list of the save files generated by Candat.

Notice that the name of these files are the names we specified when we ran the reports. Some of these files document the layout of the data so that it can be provided to external programs that require that layout.

Most programs today will accept delimited files. Candat uses the “tab” character as a delimiter. The first row of these “tab-delimited” files contains a variable name which corresponds to the data in the following rows. You can change these variable names in three ways, if desired:

  • within Candat by changing the short description of the nutrient names;

  • by using an editor and changing the first row of the data file;

  • within the program you are using to view the data, using the features of that program (in spreadsheets you would change the first row, in statistical packages you would change the variable names).

The following pages are screen captures from these files and show what the information looks like. Remember, these files are formatted for computers to read, they may look a bit strange to you.

Some of the following files are wider than a screen. In Candat you view them by using the Ctrl-{arrow-right} key. In this case we have just done a screen capture of each screen that came up as we scrolled to the right. Remember, these files are meant to be used by computer programs.

1 of 5

2 of 5

3  of 5

4 of 5

5 of 5

1 of 4

2 of 4

3 of 4

4 of 4

This file has 25 fields, the first 10 only are shown here. No data was input after the weight field.

1 of 3

2 of 3

3 of 3

1 of 4

2 of 4

3 of 4

4 of 4

The DEMO.TXW and DEMO.WTD files look like the above DEMO.TXS files and are not reproduced here for simplicity. They would be different if there were multiple days in the week and some of the days in the week included weekend days as well.

I am sure that when you enter your own data and start looking at these reports you will get a good feeling for how thorough and accurate they really are.

A small aside but important note: You will notice that some of the values in the reports are negative. These are missing values generated by foods that did not have values for particular nutrients. In totals they are counted as zero. Statistical software usually treats missing values differently than regular values and take them into consideration in some calculations.

This concludes the “getting started” tutorial. By now you should have acquired the keyboarding skills required to get your information into and out of Candat and be sufficiently confident to explore the other areas of Candat.

Remember we are here to answer each and every one of your questions. Candat is the calculation engine that generates your data. You can now use whatever software you wish to complete your analyses and present or publish your data.

If you have any difficulties with the software please contact us and let us know. It is the only way we can help.

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