Time and date variable formatting

A time variable (i.e., independent variable) is required for time-based models (e.g., PK models, or any model capable of undergoing time-evolution). A column mapped as Time must contain numeric values or character entries in an accepted time format.

The values in the Time column are evaluated to decide if time is complex or not. Time is considered complex if there is a Date column, or if the Time column contains anything indicating clock time, like a colon (:), “am”, “pm”, “a”, “p”, etc. If time is complex, it means time within the subject is measured relative to the first time in that subject, it is not absolute. If time is not complex (i.e., simple) it means time is absolute, so even if the first event in a subject occurs at time 10, the subject starts evolving at time 0, and evolves for 10 time units before getting to that first event. If a dataset contains blank time data, the model will not execute.

Any combination of the time/date formats described below is accepted by Phoenix NLME.

Time format

Phoenix NLME uses the basic time format of hour:minute:second. Below are some examples of acceptable variations of this format:

hh:mm:ss (24 hour clock, e.g., 15:00:00)

hh:mm:ss tt (where tt can be 'am', 'pm', 'AM' or 'PM' in any mixture of upper and lower case, e.g., 03:00:00 pm)

hh:mm:ss t (where t can be 'a', 'p', 'A', or 'P', e.g., 03:00:00 p)

hh:mm (seconds are assumed 00, e.g., 15:00 or 03:00 pm or 03:00 p; 03:01 or 3:1)

This format (time with a ':' character) is converted into hours (basic unit of time) although no unit is printed in the output. Time column units (if present) are not considered part of the format, however, they are carried to the model output.

Hours are not limited to 24, and minutes and seconds are not limited to 60.

Numeric times are accepted (integers and fractions). These can be used by themselves as relative times from first event, or in combination with a date variable. If they are combined with a date variable, then the dosing date/time will be subtracted from the sample date/time to calculate a relative time. For example, if the dose is given on 01/01/2010 at time 2 and the first and second samples are taken at 01/01/2010 at time 12.5 and 01/02/2010 at time 2 respectively, then the relative times used would be a dose at time zero and samples at times 10.5 and 24.

Date format

A Date format can be specified by checking the option of Date? and selecting an appropriate format in the Input Options tab. This option indicates that event times are a combination of a date and a time format. Note that when selecting a date format, two columns need to be mapped: one for date and one for time.

The accepted date formats in Phoenix NLME are:

Day-Month-Year (most of world)

Month-Day-Year (U.S.)

Year-Month-Day (Asia, ISO)

Year-Day-Month

Although Phoenix worksheets accept other date formats as input (see the “Date and time formats” section in the Phoenix Worksheets documentation), only the four date formats above are accepted as time entries in Phoenix NLME.

A date can be three or two numbers separated by any non-numeric character (4 26 10, 2010/26/04, etc.), or one number.

Three numbers are assumed to be the year, month, and day in whatever order is specified.

Two numbers are assumed to be month and day.

One number is assumed to be the day.

The year can be expressed as four, three, or two digits.

Four digits long is taken as is.

Three digits long is assumed to be in the millennium starting at 1980 (000 = 2000, 979 = 2979, 980 = 1980).

Two or one digits long is assumed to be in the century starting at 1980. (99=1999, 00 or 0=2000, 79=2079, 80=1980).

Leap years are assumed to occur in 1980 and every fourth year after. Leap seconds are not considered.

If the year is not given, it is assumed to be 1980. This is the number called the “CenturyBase” and cannot be changed in the user interface, although it can be changed in command-line mode.

Months are numeric, starting with 1 for January. If a month number is less than one or greater than 12, it is flagged as an error.

Days of the month start with 1. If a day number is less than 1 or greater than 31, it is flagged as an error. However, a non-existent date, such as 1981/02/29 or 09/31 is not flagged but just wraps into the following month.

The number of days in a month depends on the month, and for February, it depends on the leap year.

Dates are converted into the number of hours since 00 hours January 1, 1980.

Phoenix NLME does NOT require that time entries be sorted. By default, Phoenix NLME will sort the time entries within ID. This default can be overwritten by unselecting the Sort Input? selection under the Run Options tab (e.g., when executing pooled data models). If Sort Input? is unchecked, and time entries are not sorted in the input data, the model will not run.


Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.