I need to write a code for estimate joint probabilities of events that have their own independent probabilities. As an example, I have attached an Excel spreadsheet which does the calculations. The actual calculations that I need to do in SAS, has numerous more events and thousands more possibilities. However, I think, if I can get some help with this example, I will be able to write a code for my actual calculation. In the spreadsheet, the raw data is from row 2 to 101. Row one has the heading. The data consists of 5 events A, B, C, D and X. Each event has 4 possible outcomes, with their own unique probabilities, which are also available. The data is for 5 years. I need to estimate the joint probabilities of different possibilities of A, B, C, and D with those of X. For example, A1 with X1, X2, X3 and X4, and then with A2 with X1, X2, X3 and X4. Similarly, for A3, and A4, and then with B, C and D. As an example, I show the calculations in the spreadsheet from rows 107 to 430. The column titled Joint Possibilities show the possible combinations, and the Column Joint probabilities estimates the probabilities.
... View more