Proc Univariate provides three tests of location: t, signed, and ranked sign. These test results are provided if your analysis variable is equally weighted, i.e. when no WEIGHT option is used. However, when the WEIGHT option is used, the results for sign and ranked sign tests are not provided, while only those of the t test are. I can understand why they are not provided for the sign test, because the results should in principle be the same as when no weight option is used. But I would like to get the ranked sign results of a weighted analysis variable. Does any body know how to do this in a SAS with an in-built procedure? FYI, my analysis variable is excess bond returns (difference between actual bond return and an index return) , so the interval to calculate the ranks is well defined. However, I want to calculate the value of a portfolio of excess returns (for an event study) on each trading day. I want to weight the excess returns of each bond issue in the portfolio according to market value. In other words, the excess return ranking will be based not only size of the excess return, but also on the weight of the issue. I provide a sample data set. The main analysis variable is abret11 (excess or abnormal returns of bonds). The weight variable is pfmv_bdo. The by variables are bindx_cat evttime. Using proc univariate and assuming equally weighted excess returns, the code I would use is: proc univariate data=sample100 ; by bindx_cat evttime; var abret11; ods output testsforlocation = test1; /* This contains the p-values */ ods output moments = test1a; /* This contains the descriptive data */ run; What I would like to do, if it were possible, is add the option: WEIGHT pfmv_bdo; and also get results for the Ranked Sign test. The question is HOW??? Thanks for any help provided. Ian.
... View more