Foods that we eat and their relationship to health

  • 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.