I would like to estimate the (cumulative) density function of a continuous variable (TimeToEvent) with proc kde. proc KDE data=DistributionSet;
univar TimeToEvent / percentiles=0 to 100 by 0.01;
ods output percentiles=P1CDF;
run; As I only have one variable, I use an univar statement. For smoothing I use the SJPI method. If I output the estimated density function, it looks just great. However, in a next step, I would like to use the estimated density function to map probabilities (probabilities like P(X<=x)) to certain values of the continuous variable (TimeToEvent) in a data base. In order to do that, I should have access to either the expression of the estimated smooth density function or a fine map of either the estimated smooth density function or the cumulative density function. The only solution I could come up with is the following: I output 10000 percentile values (percentiles=0 to 100 by 0.01). However, I think these percentile values are calculated directly from the sample of the TimeToEvent variable (if I plot the values I see a stepwise function), not based on the estimated smooth density function. Could you suggest a better solution on how to "access" the estimated smooth density function?
... View more