**Objectives:** learn how to define and use regression variables (time varying covariates).

**Projects:** reg1_project, reg2_project

## Introduction

A regression variable is a variable which is a given function of time, which is not defined in the model but which is used in the model. is only defined at some time points (possibly different from the observation time points), but is a function of time that should be defined for any (if is used in an ODE for instance, or if a prediction is computed on a fine grid). Then, Mlxtran defines the function by intepolating the given values . In the current version of Mlxtran, interpolation is performed by using the last given value:

## Continuous regression variables

**reg1_project**(data = reg1_data.txt , model=reg1_model.txt)

We consider a basic PD model in this example, where some concentration values are used as a regression variable:

[LONGITUDINAL] input = {Emax, EC50, Cc} Cc = {use=regressor} EQUATION: E = Emax*Cc/(EC50 + Cc)

The predicted effect is therefore piecewise constant: it changes at the time points where concentration values are provided:

## Categorical regression variables

**reg2_project**(data = reg2_data.txt , model=reg2_model.txt)

The variable takes its values in {1, 2} in this example and represents the state of individual at time . We then assume that the observed data has a Poisson distribution with parameter if and parameter if . is known in this example: it is then defined as a regression variable in the model:

[LONGITUDINAL] input = {lambda1, lambda2, z} z = {use=regressor} EQUATION: if z==0 lambda=lambda1 else lambda=lambda2 end DEFINITION: y = {type=count, log(P(y=k)) = -lambda + k*log(lambda) - factln(k) }