Skip to main content
29 events
when toggle format what by license comment
Oct 11, 2023 at 10:28 vote accept julienbio99
Oct 10, 2023 at 21:47 answer added julienbio99 timeline score: 7
Dec 28, 2022 at 13:31 answer added dipetkov timeline score: 4
May 16, 2022 at 15:00 history tweeted twitter.com/StackStats/status/1526215920900882433
May 16, 2022 at 14:09 history edited kjetil b halvorsen CC BY-SA 4.0
edited tags
Nov 5, 2021 at 14:08 history edited rep_ho CC BY-SA 4.0
code formating
Oct 29, 2021 at 2:29 vote accept julienbio99
Oct 29, 2021 at 2:29
Oct 22, 2021 at 12:50 comment added julienbio99 Excellent. Things are definitely starting to get clearer. Thanks @COOLSerdash for your input and the reference. Cheers.
Oct 22, 2021 at 12:41 comment added COOLSerdash It's also a Wald-based interval. The standard errors returned by predict(..., se.fit = TRUE) are also based on the delta method. But the procedure to find the confidence interval for the LD50 is different. dose.p directly calculates the standard error for the LD50 while your procedure uses the pointwise confidence limits around the curve. It may be interesting to compare the performance of both procedures. Based on the paper by Paige et al. (2011), I suspect both will be surpassed by the more sophisticated methods mentioned therein (e.g. the saddlepoint method).
Oct 22, 2021 at 12:37 comment added julienbio99 @COOLSerdash this helps clarify things. I'm now realizing that I was not obtaining Wald CIs with dose.p(), but the Delta method ones. Also, can you please point to "the paper linked by Geoffrey compares no less than 6 methods for calculating CIs of LD50 (or other quantiles)", as I haven't been able to trace it back. Thanks.
Oct 22, 2021 at 12:32 comment added COOLSerdash The standard error of dose.p is based on the delta method. The resulting confidence interval could also be described as a Wald-based interval, but the standard error is estimated differently.
Oct 22, 2021 at 12:17 comment added julienbio99 @COOLSerdash this would make sense. Estimated SE (se.fit=TRUE) on the logit scale are symmetrical, but will often produce asymmetrical SE (and thus CIs) on the response scale. I've produced the plot above by applying the method you've just described. This would likely mean that the dose.p() symmetrical SE on the response scale does not allow us to estimate the "true" Wald CI, but rather an approximation of it - at least the way I see it. See also: stackoverflow.com/questions/44534864/… logit scale is better for this.
Oct 22, 2021 at 12:02 comment added COOLSerdash I think these are simply backtransformed Wald-based confidence intervals on the logit scale (see Hosmer DW, Lemeshow S, Sturdivant RX (2013): Applied Logistic Regression. 3rd ed. Wiley, page 17).
Oct 22, 2021 at 11:44 comment added julienbio99 @COOLSerdash thanks for these precisions. I will certainly look further into this. I'm a bit puzzled that the estimated CIs we get from a logistic regression in R are not that clear about what they are exactly. Thanks again for your input. I'm interested in the SE/CI of the fitted values from a logistic regression model, so I need to be sure that what I get from predict() is truly [put method here] based.
Oct 22, 2021 at 11:29 comment added COOLSerdash @julienbio99 Gavin Simpson is pretty clear on this and confirms my suspicion: "exp(confint(fit)) will give you either Wald or profile likelihood (depending on pkgs loaded) confidence intervals on the parameters of the model, not the fitted values of the model." So I'm pretty sure that what you're calculating based on predict are not profile likelihood-based confidence intervals. The paper linked by Geoffrey compares no less than 6 methods for calculating CIs of LD50 (or other quantiles).
Oct 22, 2021 at 11:12 comment added julienbio99 @COOLSerdash this example is of interest for parameter CIs (profile likelihood vs. Wald): r-bloggers.com/2011/11/… However, for predict(), people do not seem to be unanimous about this: stackoverflow.com/questions/14423325/… So the short answer to your question: no, I don't have a reference for this. On the other hand, if the CI obtained with dose.p() is correct (Wald), the CI with predict() differ (see plot) = should be the profile likelihood CI?
Oct 22, 2021 at 10:56 comment added julienbio99 @Edm I've ran the same model on the same data, MASS being installed, but not loaded into active R session, and use first the confint() and obtain the message "Waiting for profiling to be done..." indicating that profile likelihood CIs were computed. Using the confint.default() provided me with narrower CIs for the parameter estimates. I couldn't use dose.p(), as MASS was not loaded into R. After doing so, I've got the same results. But thanks for the warning note: someone who does not have MASS installed could get different result, but I don't know for this.
Oct 22, 2021 at 6:54 comment added COOLSerdash In addition to what @EdM said: Do you have a reference that confirms that confidence intervals obtained by predict are profile likelihood intervals? I've never heard that term in that context. Thank you.
Oct 22, 2021 at 0:45 history edited julienbio99 CC BY-SA 4.0
edited body
Oct 22, 2021 at 0:02 answer added Geoffrey Johnson timeline score: 5
Oct 21, 2021 at 21:58 comment added EdM A warning: profile-likelihood CI aren't necessarily the default in R. IF the MASS package is installed then calling confint() on a glm or nls object will end up calling the corresponding MASS functions, which do use profile likelihoods. Otherwise, the Wald CI based on the covariance matrix of the coefficient estimates will be used.
Oct 21, 2021 at 20:29 history edited julienbio99 CC BY-SA 4.0
added 99 characters in body
Oct 21, 2021 at 20:15 comment added julienbio99 Thanks for the suggestion @Ggjj11. I was aware about the quantile regression, but not the logistic quantile regression. It looks like the lrq package in R can allow such an analysis. I will definitely have a look at it. But regarding the profile likelhood CIs, do you have a suggestion to rapidly estimate the uncertainty without going through all the steps I've described? Thanks.
Oct 21, 2021 at 19:43 comment added Ggjj11 Can you do Quantile (logistic) regression on your logistic regression model? Then you would just choose the 2.5 and 97.5 percentile curves to be drawn in addition to the 50 percentile curve. See journals.sagepub.com/doi/pdf/10.1177/1536867X1101100301
Oct 21, 2021 at 19:28 history edited julienbio99 CC BY-SA 4.0
edited title
Oct 21, 2021 at 19:15 history edited julienbio99 CC BY-SA 4.0
deleted 46 characters in body
Oct 21, 2021 at 19:10 history edited julienbio99 CC BY-SA 4.0
deleted 46 characters in body
S Oct 21, 2021 at 19:02 review First questions
Oct 21, 2021 at 19:51
S Oct 21, 2021 at 19:02 history asked julienbio99 CC BY-SA 4.0