Skip to content

create vignette AE#59

Open
Lpierott wants to merge 39 commits intomainfrom
AE
Open

create vignette AE#59
Lpierott wants to merge 39 commits intomainfrom
AE

Conversation

@Lpierott
Copy link
Contributor

No description provided.

@Lpierott Lpierott linked an issue Feb 19, 2025 that may be closed by this pull request
Copy link
Member

@DanChaltiel DanChaltiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up 😃

Copy link
Member

@DanChaltiel DanChaltiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Livia go !

Copy link
Member

@DanChaltiel DanChaltiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Livia GO !

Copy link
Member

@DanChaltiel DanChaltiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah !

%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
date: "2025"
---
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the date, can we change the one in KM too and remove my name? I did not realise that when we done it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what I think about having the date, as different parts may have different update times.
However, I like that author's names are written, it gives credit where its due, why removing it?

- `enrolres`, which includes all patients and their respective treatment arms.

The AE table provides one row for each adverse event reported for a patient, capturing key details such as the event term, its grade, the associated System Organ Class, whether it is related to the study treatment, and whether it meets the criteria for a serious adverse event. A single patient may therefore appear multiple times if they experience several events, while those with no adverse events do not appear in the table at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charlotte's comment:
On n’a pas de précision sur la table ae : il faudrait dire qu’à chaque fois qu’un adverse event est reporté, il y a des informations comme le grade, le terme, le SOC (les définir), le fait que cet AE soit relié au traitement, s’il est considéré comme SAE (définitions)… qui sont représentées sur une seule ligne pour chaque AE. Un patient peut avoir plusieurs AEs et aura donc autant de ligne que d’AEs dans cette table. Un patient peut ne pas avoir d’AEs et ne pas être dans la table.

Answer:
J'ai fait une head ae et enrolres pour avoir une idee du dataset.
Alors oui et non. C’est pas un cour non plus de Clinical trial sur les AE mais c’est comment présenter les AE dans un rapport stats.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faire head ae est suffisant, je suis d'accord.
Si on décrit trop, la vignette est trop longue et personne ne la lit.

Create adverse event (AE) grade tables using `ae_table_grade()`.

The function `ae_table_grade` produces different AE grade table summaries based on the value of the variant argument ("max", "sup", "eq"), which defines the summary type applied to the AE grades. By default, all three summary types are returned within a single output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the writting as Charlotte said few times that the word "variant" is very confusing, and the reader do not know what it is about. I agree!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentaire de Charlotte: "On manque de précision sur le rendu global de cette fonction avant d’entrer dans les détails des « variants ». C’est une fonction qui va donner comme statistique un effectif et un pourcentage d’apparition de tel type d’AE, à tel grade, pour tel bras de traitement … "

Reponse: Not sure if it needs more writing that there is already.

Copy link
Member

@DanChaltiel DanChaltiel Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est vrai que le terme "variant" est confusing, et du coup je suis d'accord qu'il faut plutôt d'abord décrire ce que fait la fonction par défaut.
Genre : "la fonction décrit 3 estimates: le grade max et l'ocurrence de grade égal ou sup ou égal blablabla. On peut contrôler l'output avec l'argument variant"
Pas forcément besoin de détailler plus, normalement le lecteur devrait vite comprendre le principe.

- The most common summary type, **`variant = "max"`**, generates a table showing the maximum AE grade per patient, where N is the total number of patients in the study.

- **`variant = "sup"`**, summarises the grades greater than or equal to a specified grade per patient, where n is the number of patients having experienced at least one AE of grade ≥ X, where X ∈ {1, 2, 3, 4, 5}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J ai rajoute " ≥ X, where X ∈ {1, 2, 3, 4, 5}." parce que charlotte le suggereait plus ou moins dans une de ces commentaire; "Quel argument permet de fixer le X d’intérêt? ". le max grade en oncology c est bien 5?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le max c'est 5 partout, pas juste en oncologie.
C'est vraiment difficile de décrire ce truc de "égal versus sup/égal", mais je n'ai pas l'impression que ce soit plus clair avec une notation plus math. En tout cas moi ça me perdrait plus qu'autre chose.

BTW, je ne suis pas sûr de "most common", ça dépend des pratiques des uns et des autres, des journaux, etc.

- **`variant = "eq"`**, presents all grades for all patients. In this table, each proportion represents the number of patients who experienced a given grade at least once, where n is the number of patients having experienced at least one AE of grade equal to X, where X ∈ {1, 2, 3, 4, 5}.

## Default AE Table Grades - incuding All Variants (Max, Sup, Eq)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charlotte Commentaires: Ok sur le rendu par défaut mais mérite d’être plus clair avant. Par ailleurs, est-ce qu’il n’y a pas un moyen d’avoir des noms de colonne plus jolis et standards que « label », « variable », « treatment arm » tout en ayant « all patients » juste en dessous… dans les MACRO SAS les majuscules/minuscules et noms de colonnes étaient un peu plus soignés. Il faut voir comment modifier ces noms de colonnes de tableaux voir les supprimer sauf quand il y a les bras de traitements et des effectifs.

Copy link
Member

@DanChaltiel DanChaltiel Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est une bonne remarque !
A la base ces tables venaient de crosstable donc les noms de colonnes viennent de là. C'est vrai qu'ils ne sont pas du tout adaptés dans ce contexte.
On peut les modifier, ce n'est pas très compliqué à faire, il faudrait le mettre dans une nouvelle issue avec une suggestion de nom.

```

## Custom table of maximum AE grade per patient per arm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charlotte comment: Préciser que arm = “arm” signifie que le bras de traitement a pour nom de variable “arm” et est issu du data frame “enrolres”.
Answer:Not quite sure every single things should be explain

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure either

The function ae_table_soc() creates a summary table of AE grades for each patient according to AE term and SOC Common Terminology Criteria for Adverse Events. (CTCAE). The resulting dataframe can be piped to as_flextable() to get a nicely formatted flextable.

## Table of AE grades by SOC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charlotte: La colonne s’appelle “Total” (texte) ou “Tot » (sur la sortie R) ?
On n’explique pas pourquoi on a ajouté les arguments « term = NULL » et sort_by_count = FALSE. D’ailleurs le sort_by_count n’est jamais à TRUE dans un exemple de ctet vignette.

Answer: pour montrer la difference entre la table 4.1 et table 4.2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A la base, j'avais mis Tot pour que ce soit aussi court que "G5", surtout dans les tables très larges.
Mais c'est vrai que c'est moche en fait, et ça ne fait pas gagner tant de place vu les nombres dans la colonne.
Idem, à mettre dans une issue, c'est un problème de la fonction ae_table_soc(), pas de la vignette.

as_flextable() %>%
add_footer_lines("In the header, N represents the number of patients.") %>%
add_footer_lines("Percentages reflect the proportion of patients whose maximum AE grade was as indicated.")
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Charlotte's comment:  Pas d’indication sur les autres manières de reporter les AEs ? Filtre sur les SAEs ? Filtre sur les AEs reliés au traitement ?
 Il manque une partie avec la liste des arguments des fonctions et ce à quoi ils correspondent, sous quels formats ils doivent être, s’ils sont obligatoires ou optionnels, quelles sont leurs valeurs par défaut, comment ils sont utilisés pour faire les sorties des tableaux…

Answer: je suis pas sur qu on devrait rallonger la vignette peu etre mais pas pour le moment, comme on avait dit pour les TEAE. enssuite le fait de faire la liste de tout les elments de la function ca c est dan la help, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui c'est dans le help.
Tu peux peut-être écrire "pour plus d'exemples (genre filtrer), aller voir la doc avec ce lien" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vignette : description des AE

2 participants