Array 2.0: matrix-friendly array in Proc Fcmp Array is probably the only number-indexed data type in SAS. Interestingly, SAS and R, the major statistical softwares, use 1 instead of 0 to specify the first element. SAS programmers adopt array mostly for multiple-variable batch-processing. For example, longitudinal summation can be achieved by specifying a one-dimensional array and then adding all array elements together. On the contrary, general-purpose programming languages, like Java, Python, C++,  widely use array or list to store and index data. The programmers who newly switch into SAS often feel confused about the limitation of SAS’ array, which is transient and need output to the parental ...
Proc Fcmp(2): a subroutine for Binomial-CRR model Problems: Quote for six-month American style euro currency options on plain vanilla, Max[S-K,0]and 〖Max[S-K,0]〗^0.5. Exchange rate S_0=$1.3721 /euroSix-month continuously compounded inter-bank rates: r=0.4472%,r_f=1.2840%.Assumptions:The exchange rate for euro follows an iid log normal price changes and volatility is constant.Methodology:Binomial Model is used to price American currency options on euros.We calculate the payoffs at time T and discount payoffs to the prior time step. Under the risk neutral probability measure,c_(t-1)=(q×c_u+(1-q)×c_d)/RSince these two options are American styles, we need to check for optimal early exercise at each node of the binomial tree. For these two currency options, we check Max[S-K,c_(t-1),0] and Max[〖Max[S-K,0]〗^0.5,c_(t-1) ] ...
Proc GLM v.s. IML in ANOVA data thrust; input speed100 speed250 speed400 speed550; if _n_ le 15 then feed=0.015; if _n_ le 10 then feed=0.010; if _n_ le 5 then feed=0.005; cards; 121 98 83 58 124 108 81 59 104 87 88 60 124 94 90 66 110 91 86 56 329 291 281 265 331 265 278 265 324 295 275 269 338 288 276 260 332 297 287 251 640 569 551 487 600 575 552 481 612 565 570 487 620 573 546 500 623 588 569 497 ;run;data thrust2; set thrust; array speedarray(4) speed:; do i = 1 to 4; force ...
Predict 3G users for telecom by using SAS Enterprise Miner Situation: For a telecommunication company, there are a training dataset of 18,000 customers and a scoring dataset of 2,000 customers.Task:Find potential 3G users from the existent 2G users to increase ARPU and MARPUAction: Trained models by decision tree, neural network and logistic regression on SAS EM 5.2.Result: Proposed tailed device and service, promotion channel, and branding image strategy for segments; Formed an ensemble model with misclassification rate <.04 and Impremented the model. /*VERY BEGINNING: DATA TRANSFER FOR MODELING BY SAS ENTERPRISE MINER*/options noxwait noxsync; dm 'x "cd D:\";'; dm 'x " md mylib" ';dm 'x "xcopy d:\matchresult\*.*/D/E/S/R/Y/A d:\mylib " ';
Statistical analysis of Medicaid data