Supplement 1. The Splus code for estimating parameters and calculating the posterior probability distributions for DA risk metrics.
收藏资源简介:
File List S-Plus code: ParameterEst.ssc kalman_ests.m PostPDFPlots.ssc All files are in ASCII text. Description The file ParameterEst.ssc contains Splus code to estimate m and s2 using ML, running sums, and slope methods. The ML method allows missing data; the running sum and slope methods do not. For these methods, missing data points should be replaced with interpolated values. I use simple linear interpolation. Basic diagnostics are done also: normality, trend and autocorrelation tests. Outliers are tested for and removed using DFFITS criteria. The file kalman_ests.m contains matlab code to estimate m and s2 using the Kalman filter algorithm. The file PostPDFPlots.ssc calculates posterior probability distributions for the parameters, m, s2, and s2np, and the risk metrics, l, probability of eventual 90% decline, and expected total probability of 90% decline within given time frames. This code implements the algorithm given in the section Posterior probability distributions in the text and produces Figs. 8 and 9.



