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

Add check to see if multiple identical minimum values suggesting censoring #371

Open
joethorley opened this issue Jul 25, 2024 · 1 comment

Comments

@joethorley
Copy link
Collaborator

Treating as non-censoring is both invalid and can cause convergence failure.

@joethorley
Copy link
Collaborator Author

x  <- structure(list(original.CAS = c(75058, 75058, 75058, 75058, 75058, 
75058, 75058, 75058, 75058, 75058, 75058, 75058, 75058, 75058
), Test.type = c("A", "A", "A", "A", "A", "A", "A", "A", "A", 
"A", "A", "A", "A", "A"), Latin.name = c("Artemia salina", "Asellus intermedius", 
"Daphnia magna", "Dugesia tigrina", "Gammarus fasciatus", "Helisoma trivolvis", 
"Lepomis macrochirus", "Leuciscus idus", "Leuciscus idus melanotus", 
"Lumbriculus variegatus", "Oryzias latipes", "Pimephales promelas", 
"Poecilia reticulata", "Raphidocelis subcapitata"), Effect.value = c(399650, 
1e+05, 3589986.07239638, 1e+05, 1e+05, 1e+05, 1850000, 5800000, 
6422032.3885823, 1e+05, 1e+06, 1289765.53208085, 1650000, 7940000
), Trophic.Level = c("INVERT", "INVERT", "INVERT", "INVERT", 
"INVERT", "INVERT", "FISH", "FISH", "FISH", "INVERT", "FISH", 
"FISH", "FISH", "ALGAE"), Short_name = c("Acetonitrile", "Acetonitrile", 
"Acetonitrile", "Acetonitrile", "Acetonitrile", "Acetonitrile", 
"Acetonitrile", "Acetonitrile", "Acetonitrile", "Acetonitrile", 
"Acetonitrile", "Acetonitrile", "Acetonitrile", "Acetonitrile"
), Conc = c(399650, 1e+05, 3589986.07239638, 1e+05, 1e+05, 1e+05, 
1850000, 5800000, 6422032.3885823, 1e+05, 1e+06, 1289765.53208085, 
1650000, 7940000)), class = c("grouped_df", "tbl_df", "tbl", 
"data.frame"), row.names = c(NA, -14L), groups = structure(list(
    original.CAS = 75058, Test.type = "A", .rows = structure(list(
        1:14), ptype = integer(0), class = c("vctrs_list_of", 
    "vctrs_vctr", "list"))), row.names = c(NA, -1L), .drop = TRUE, class = c("tbl_df", 
"tbl", "data.frame")))
ssd_fit_dists(data = x, dists = "lnorm_lnorm", left = "Left", right = "Right",
              silent = FALSE, min_pmix = 3/nrow(x),
              computable = FALSE, at_boundary_ok = TRUE)

x$Right <- x$Conc
x$Left <- x$Conc

x$Left[x$Left == min(x$Left)] <- 0

ssd_fit_dists(data = x, dists = "lnorm_lnorm", left = "Left", right = "Right",
              silent = FALSE, min_pmix = 3/nrow(x),
              computable = FALSE, at_boundary_ok = TRUE)

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

No branches or pull requests

1 participant