-
Notifications
You must be signed in to change notification settings - Fork 17
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
Implement ssd_fit_dists()
with right censored data
#207
Comments
library(ssdtools)
data <- ssdtools::boron_data
data$right <- data$Conc
data$right[1] <- Inf
ssd_fit_dists(data, dists = "lnorm", right = "right")
#> Error: Distributions cannot currently be fitted to right censored data. Created on 2021-08-02 by the reprex package (v2.0.0) |
ssd_fit_dists()
with right censored data
Note if switch off check then get the following library(ssdtools)
data <- ssdtools::boron_data
data$right <- data$Conc
data$right[1] <- Inf
ssd_fit_dists(data, dists = "lnorm", right = "right")
#> Warning: Distribution 'lnorm' failed to fit (try rescaling data): Error in optim(model$par, model$fn, model$gr, method = "L-BFGS-B", lower = lower, :
#> non-finite value supplied by optim
#> .
#> Error: All distributions failed to fit. Created on 2021-08-02 by the reprex package (v2.0.0) |
The issue is handling the infinite values in the TMB C++ code. Really just need to replace existing code
with
|
Hi Joe, I'm playing around with a data set with right censored values, is this still on the list of things to implement? |
Yes it is. I'll try and find some time to scope out how much time it would take and see whether the maintenance budget would cover it. What are your time scales? |
No description provided.
The text was updated successfully, but these errors were encountered: