You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prediction confidence intervals GLM and discrete #2015
confidence intervals for the mean (expected value) of non-linear, single-index models
ci can be obtained by applying the inverse link function to the linear prediction ci.
They don't need the delta method, and Stata uses a mix of delta method and transformation of bounds.
However, I read somewhere (???) in the Stata manual about endpoint transformation confidence intervals for predefined transformation, exp for odds ratio and similar in Poisson or other exponential/log-linear models.
They get prediction interval for nongaussian GLM like Poisson through simulation using sampling distribution of params with cov_params.
get_prediction needs more systematic unit tests.
Based on a google search, R base packages still don't have confidence interval for predicted mean, there are many blogs using endpoint transformation with inverse link.
update
ciTools add_ci has the same confint as get_prediction in Poisson example
but I think the append to dataframe interface is annoying and not computationally efficient, it might require copying the original data if the appended arrays needs contiguous memory.
I don't see a way to get results in a new dataframe.
(I guess they added it because of the pipes as in the example)
I don't know what tolerance intervals are.
Mostly they sound like scipy distributions interval
It's not clear to me whether they take parameter estimation and uncertainty into account
Activity
josef-pkt commentedon Feb 17, 2019
check this, what's left to do?
get_predictionhas been added for mean predictionsee
#4745 for prediction intervals of a new obs with parameter uncertainty
#3415 predict_prob and other predicted statistics
josef-pkt commentedon Oct 15, 2020
reference and stata functions for verification
confidence interval for predict for discrete models
endpoint transformation works only in simple cases
They have delta method for ologit, mnlogit, but not for ZI count models.
Xu, Jun, and J. Scott Long. 2005. “Confidence Intervals for Predicted Outcomes in Regression Models for Categorical Outcomes:” The Stata Journal, December. https://doi.org/10.1177/1536867X0500500405.
formulas/math: https://jslsoc.sitehost.iu.edu/stata/ci_computations/spost_deltaci.pdf
working paper of related interest "Group comparisons in logit and probit using predicted probabilities"
https://jslsoc.sitehost.iu.edu/files_research/groupdif/groupwithprobabilities/groups-with-prob-2009-06-25.pdf
(I didn't read it)
josef-pkt commentedon Dec 11, 2020
interesting R package ciTools, based on skimming the glm vignette
https://cran.r-project.org/web/packages/ciTools/vignettes/ciTools-glm-vignette.html
They get prediction interval for nongaussian GLM like Poisson through simulation using sampling distribution of params with cov_params.
get_prediction needs more systematic unit tests.
Based on a google search, R base packages still don't have confidence interval for predicted mean, there are many blogs using endpoint transformation with inverse link.
There are several other R packages with ci (and pi?) for glm predict, but without informative docstrings
e.g. https://rdrr.io/cran/HH/man/interval.html
update
ciTools add_ci has the same confint as get_prediction in Poisson example
but I think the append to dataframe interface is annoying and not computationally efficient, it might require copying the original data if the appended arrays needs contiguous memory.
I don't see a way to get results in a new dataframe.
(I guess they added it because of the pipes as in the example)
josef-pkt commentedon Dec 11, 2020
see also #6979
I don't know what tolerance intervals are.
Mostly they sound like scipy distributions
intervalIt's not clear to me whether they take parameter estimation and uncertainty into account
josef-pkt commentedon Nov 16, 2024
closing as outdated
most parts have been added with get_prediction methods.
Adding
referencelabel so we know which closed issues have literature references or links to other packages