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). Columns 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 rel­ative 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.

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)

This format (time with a ':' character) is converted into hours (basic unit of time) although no unit is printed in the output. If there are units in the time column these are not taken into account for this for­mat.

Formats like hh:mm also accept non leading zeros so both 03:00 and 3:00 are accepted. Similarly, both 03:01 and 3:1 are accepted.

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

Hour or hour.fraction 

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 vari­able, 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.

If there are units on a time column that contains numeric values without a date variable, these units are carried to the model output.

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, the user needs to map two columns: 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

The date consists of one, two, or three numbers separated by any non-numeric character (4 26 10, 2010/26/04, etc.). If there are three numbers, they are assumed to be the year, month, and day in whatever order the user has chosen. If there are only two numbers, they are assumed to be month and day. If only one number, it is assumed to be the day.

If the year is four digits long, it is taken as is. If the year is three digits long, it is assumed to be in the millennium starting at 1980. (000=2000, 979=2979, 980=1980). If the year is two or one digits long, it 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 it is 1980, 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. 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.

A non-existent date, such as 1981/02/29 or 09/31 is not flagged, but just wraps into the following month.

Any combination of these time/date formats is accepted by Phoenix NLME.

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

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.

Columns mapped as Time must be numeric values or text entries in an accepted time format. If the Date? option is selected, the user would then need to map both Date and Time columns in one of the accepted formats described above.


Last modified date:7/9/20
Certara USA, Inc.
Legal Notice | Contact Certara
© 2020 Certara USA, Inc. All rights reserved.