BookmarkSubscribeRSS Feed
sas54
Calcite | Level 5

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
PaigeMiller
Diamond | Level 26

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
Rick_SAS
SAS Super FREQ

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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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