- Model with continuous covariates
- Model with categorical covariates
- Transforming categorical covariates

**Objectives:** learn how to implement a model for continuous and/or categorical covariates.

**Projects:** warfarin_covariate1_project, warfarin_covariate2_project, warfarin_covariate3_project, phenobarbital_project

**See also:** Complex parameter-covariate relationships and time-dependent covariates

## Model with continuous covariates

**warfarin_covariate1_project**(data = ‘warfarin_data.txt’, model = ‘lib:oral1_1cpt_TlagkaVCl.txt’)

The warfarin data contains 2 individual covariates: `weight` which is a continuous covariate and `sex` which is a categorical covariate with 2 categories (1=Male, 0=Female). We can ignore these columns if are sure not to use them, or declare them using respectively the reserved keywords `CONTINUOUS COVARIATE`

and `CATEGORICAL COVARIATE`

to define continuous and categorical covariate.

Even if these 2 covariates are now available, we can choose to define a model without any covariate by not clicking on any check box in the covariate model.

Here, unchecked box in the line of the parameter V and the column of the covariate wt means that there is no relationship between weight and volume in the model. A diagnostic plot `Individual parameters vs covariates`

is generated which displays possible relationships between covariates and individual parameters (even if these covariates are not used in the model):

On the figure, we can see a strong correlation between the volume V and both the weight wt and the sex. One can also see a correlation between the clearance and the weight wt. Therefore, the next step is to add some covariate to our model.

**warfarin_covariate2_project**(data = ‘warfarin_data.txt’, model = ‘lib:oral1_1cpt_TlagkaVCl.txt’)

We decide to use the weight in this project in order to explain part of the variability of and . We will implement the following model for these two parameters:

which means that population parameters of the PK parameters are defined for a typical individual of the population with weight=70kg.

**More details about the model**

The model for and can be equivalently written as follows:

The individual predicted values for and are therefore

and the statistical model describes how and are distributed around these predicted values:

Here, and are linear functions of : we then need to transform first the original covariate into by clicking on the button `CONTINUOUS`

next to ADD COVARIATE (blue button). Then, the following pop up arises

You have to define the

- the name of the covariate you want to add (the blue frame).
- the associated equation (the green frame).
- click on the ACCEPT button

**Remarks**

- You can define any formula for your covariate as long as you use mathematical functions available in the Mlxtran language.
- You can use any covariate available in the list of covariates proposed in the window. Thus, if you have a Height and Weight as covariates, you can directly compute the Body Mass Index.
- If your go over a covariate with your mouse, all the informations (min, mean, median, and max) are displayed as a tooltip.
- If you click on the covariate name, it will be written in the formula.

We then define a new covariate model, where and are linear functions of the transformed weight as shown on the following figure:

Notice that by clicking on the button FORMULA, you have the display of all the individual model equations. Coefficients and are now estimated with their s.e. and the p-values of the Wald tests are derived to test if these coefficients are different from 0:

Again, a diagnostic plot `Individual parameters vs covariates`

is generated which displays possible relationships between covariates and individual parameters (even if these covariates are not used in the model) as one can see on the figure below on the left. However, as there are covariate on the model, what is interesting is to see if there still are correlation between the correlation and the random effects as one can see on the figure below on the right.

## Model with categorical covariates

**warfarin_covariate3_project**(data = ‘warfarin_data.txt’, model = ‘lib:oral1_1cpt_TlagkaVCl.txt’)

We use `sex` instead of `weight` in this project, assuming different population values of volume and clearance for males and females. More precisely, we consider the following model for and :

where if individual *i* is a female and 0 otherwise. Then, and are the population volume and clearance for males while and are the population volume and clearance for females. By clicking on the purple button `DIRCRETE`

, the following windows pop up

You have to define the

- the name of the covariate you want to add (the blue frame).
- the associated categories (the green frame).
- click on the ALLOCATE button to define all the categories.

Then, you can define

- the name of the categories (the blue frame).
- the reference category (the green frame).
- click on ACCEPT

Define then the covariate model in the main GUI:

Estimated population parameters, including the coefficients and are displayed with the results:

We can display the probability distribution functions of the 4 PK parameters using the `Individual parameter`

graphic:

Notice that for the volume and the clearance, the theoretical curve is is not a “pure” Gaussian law, due to the impact of the covariate sex.

## Transforming categorical covariates

**phenobarbital_project**(data = ‘phenobarbital_data.txt’, model = ‘lib:bolus_1cpt_Vk.txt’)

The phenobarbital data contains 2 covariates: the weight and the APGAR score which is considered as a categorical covariate. Instead of using the 10 original levels of the APGAR score, we will transform this categorical covariate and create 3 categories: Low = {1,2,3}, Medium = {4, 5, 6, 7} and High={8,9,10}.

If we assume, for instance that the volume is related to the APGAR score, then and are estimated (assuming that `Medium` is the reference level).

In that case, one can see that both p-values concerning the transformed APGAR covariate are over .05.