Calcite | Level 5

## Exponential line with 95% confidence intervals histograms

Hi all!

I'm currently working with a data set I made. I am trying to make a histogram of the number of medical procedures on the x-axis (patient had 1 removed, 2 removed etc..) and the frequency on the y axis. I would like for an exponential line to be superimposed on the data set along with 95% confidence intervals. With the code I currently have, there is a line superimposed on the histogram but it's not fit very well. Please let me know if you know a way to graph an exponential line with confidence intervals. Thank you!

data lib1.akdata; set lib0.akdata;

if actinic_keratoses ne 15;

proc univariate;

var actinic_keratoses;

histogram/exponential (THETA=EST);

run;

*More generally-Does anyone know how to make an exponential frequency (count) function with 95% CIs.

2 REPLIES 2
Diamond | Level 26

## Re: Exponential line with 95% confidence intervals histograms

I don't think I have ever seen a density curve with 95% confidence intervals. I'm pretty sure that PROC UNIVARIATE will not produce such confidence intervals.

I suppose you could do a bootstrap or jackknife and obtain these confidence intervals somehow, but that is beyond my wage grade — even in that case, I'm not convinced that a jackknife or bootstrap will actually work here. Those will provide estimates of variability for point estimates; I am not aware of whether or not they provide confidence intervals for a density curve.

In fact, can you please show me a reference where someone has computed confidence intervals for density curves?

--
Paige Miller
SAS Super FREQ

## Re: Exponential line with 95% confidence intervals histograms

The exponential distribution assumes a continuous variable. It sounds like you have a discrete variable because the X axis is n=1,2,3,....  If so, the exponential model might not be appropriate.

The discrete counterpart of the exponential distribution is the geometric distribution. However, the geometric model assumes independent Bernoulli trials, and it is not clear that your data fits that model. Can you post your data?  Perhaps this is better treated as a regression problem.

Discussion stats
• 2 replies
• 317 views
• 0 likes
• 3 in conversation