Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Imputation rule 50 % does not work #1208

Open
3 tasks done
legrasv opened this issue Mar 12, 2024 · 3 comments
Open
3 tasks done

[Bug]: Imputation rule 50 % does not work #1208

legrasv opened this issue Mar 12, 2024 · 3 comments
Labels
blocked bug Something isn't working sme

Comments

@legrasv
Copy link
Contributor

legrasv commented Mar 12, 2024

What happened?

the function analyze_vars_in_cols.R would have to be refined.

It's quite a complex issue that we didn't think about when you develop the function I guess.
image

In this example, I was using:
imp_rule = "1/2",
avalcat_var = "AVALC",
na_str = "NE"

The thing is that the n NON BLQ >= 1/2 is not calculated correctly, in the example above, at 288H, there are 4 patients, only two have a pk sample, and 1 is BLQ, one is non BLQ.
The formula to report the statistics should be nNONBLQ >= 1/2, but taking in account all the patients of the treatment arm so: 1 / 4 >= 1/2, FALSE, so it the summary statistics should not appear for the timepoint 288H. (While now the calculation used is 1 / 2 >=1/2)

Another thing which would be more tricky to implement is:
image
In this one, it looks correct, but the thing is we actually don't have 3 patients in the treatment arm, but 6 patients! But 3 of them where considered as excluded (filter(ANL01FL == "Y")).
So the 1/2 rule should be applied on the n = 6, meaning at timepoint 4H, we have 3/6 nonBLQ values, fine, we have the statistics. But for the timepoint at 360H, we have actually 2/6 (<= 1/2) non BLQ so the summary statistics should not appear.

This issue comes from the fact the we didn't take in account when developing the functions that there could be excluded patients ANL01FL == "Y" (so this should be kept over the workflow to keep the 6 patients as a n() of reference for the calculation nNonBLQ / n >= 1/2). This is actually the first line of code I have in my script:

t_pkconc <- function(datasets){
	adpc <- datasets$adpc %>% filter(ANL01FL == "Y")

Would there be the possibility to fix that bugs? please

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@legrasv legrasv added the bug Something isn't working label Mar 12, 2024
@Melkiades Melkiades added the sme label Mar 13, 2024
@legrasv
Copy link
Contributor Author

legrasv commented Mar 13, 2024

The easiest solution and most flexible one would in my view would be:
(similar the param in g_lineplot #' @param alt_counts_df (data.frame or NULL)\cr data set that will be used (only) to counts objects in strata.)

  • add a new parameter in the function: alt_counts_df = adpc (without exclusion of ANL01FL == "Y")
  • then this dataset is used to get the number of patient per arm. alt_counts_df %>% group_by(group) %>% summarize(n_full=n())
  • in the function imputation_rule, instead of this line: ltr_blq_ratio <- n_blq / max(1, nrow(df)), do ltr_blq_ratio <- n_blq / n_full for the associated group

@legrasv
Copy link
Contributor Author

legrasv commented Mar 19, 2024

@Melkiades I contacted gRED it looks like we may not have the same guidelines, I will update your asap.
Put this on hold for now.

@legrasv
Copy link
Contributor Author

legrasv commented Apr 11, 2024

@Melkiades @ayogasekaram Please put this issue in the archive, it's not needed yet as this issue would tackle only a few studies with very specific data (1 %) and we may not we to be that precise for this summary table. We don't need to do the development of this one unless I come back later with more information that makes us think that we should do it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Something isn't working sme
Projects
None yet
Development

No branches or pull requests

3 participants