Prev: Permute rows and columns of a rectangular matrix according to similarity
Next: using array variables as part of call to macro function
From: Matt on 28 May 2010 11:36 Hi all: I am using LIFEREG to estimate the distribution of the maximum move in prices in a given interval (i.e. the largest positive price change in a week from the previous Friday close, using 2 years' data). Then I'd like to use the estimated distribution to forecast the distribution of the next week's extreme value. LIFEREG fits a WEIBULL to the log of the distribution, and outputs an int and scale parameter. However, I can't figure out how to calculate P(X<x) using the CDF function, as the notation is WAAAY different in the SAS docs of the Weibull distn used in LIFEREG and CDF. Can anyone tell me how to use the parameter estimates from LIFEREG in CDF? Matt Roberts Associate Professor AED Economics Ohio State University
From: Matt on 28 May 2010 15:08
On May 28, 11:36 am, Matt <matthewcrobe...(a)gmail.com> wrote: > Hi all: > I am using LIFEREG to estimate the distribution of the maximum move in > prices in a given interval (i.e. the largest positive price change in > a week from the previous Friday close, using 2 years' data). Then I'd > like to use the estimated distribution to forecast the distribution of > the next week's extreme value. LIFEREG fits a WEIBULL to the log of > the distribution, and outputs an int and scale parameter. However, I > can't figure out how to calculate P(X<x) using the CDF function, as > the notation is WAAAY different in the SAS docs of the Weibull distn > used in LIFEREG and CDF. > > Can anyone tell me how to use the parameter estimates from LIFEREG in > CDF? > > Matt Roberts > Associate Professor > AED Economics > Ohio State University I figured it out...with lots of trial and error and the help of Matlab to play with all of the combinations. If this is obvious to those more versed in LIFEREG, I'm sorry, but maybe it will save someone else the trouble. proc lifereg data=estimationdata outest=maxparms noprint; model maxchg = ; run; data alldata; * merged maxparms w/ out of sample data; set alldata; prob = cdf('WEIBULL',oosmaxchg,1/_scale_,exp(intercept)); run; |