From: sofiane on 26 Jan 2010 07:27 proc iml just allow you to do matrix calculation wich is the quickest way to comput parameters matrix calculation are used by most sas statistical procedure in the background anyway so it shouldn't be quicker if you know how to set it, i think proc iml is more usefull when you want to investigate more complicated model not available in usual sas STAT or ETS procedures. regards
From: shiling99 on 27 Jan 2010 22:22 On Jan 23, 3:34 pm, Claus Yeh <phoebe.caulfiel...(a)gmail.com> wrote: > Dear SAS guru's, > > I have been using proc glm and proc logistic for a while now. these > procedures are great - alot of options and relatively easy to use. > > However, I always felt that they are a bit slow since they carry alot > of calculations and outputs that are not always needed. > > I am thinking about diving into Proc IML and write a more basic code > for regression. > > Has anyone tried that and got much faster run time? > > thank you, > claus In general I would not use IML to do a statistical analysis if a existing procedure could do it. The REG does more than calculating the beta in the following test sample.. 465 data t1; 466 do i = 1 to 50000; 467 x1=rannor(12345); 468 x2=rannor(12345); 469 x3=rannor(12345); 470 x4=rannor(12345); 471 x5=rannor(12345); 472 x6=rannor(12345); 473 x7=rannor(12345); 474 x8=rannor(12345); 475 x9=rannor(12345); 476 x0=rannor(12345); 477 y=x1+x2+x3+x4+ rannor(12345); 478 output; 479 end; 480 drop i; 481 run; NOTE: The data set WORK.T1 has 50000 observations and 11 variables. NOTE: DATA statement used (Total process time): real time 0.18 seconds cpu time 0.18 seconds 482 483 proc reg data=t1 noprint ; 484 model y=x1 x2 x3 x4 x5 x6 x7 x8 x9 x0/noint; 485 run; 486 quit; NOTE: PROCEDURE REG used (Total process time): real time 0.06 seconds cpu time 0.06 seconds 487 488 proc iml; NOTE: IML Ready 489 use t1; 490 read all var{x1 x2 x3 x4 x5 x6 x7 x8 x9 x0} into x; 491 read all var{y} into y; 492 beta=inv(x`*x) * x`*y ; 493 *print beta; 494 quit; NOTE: Exiting IML. NOTE: PROCEDURE IML used (Total process time): real time 0.07 seconds cpu time 0.07 seconds
From: shiling99 on 27 Jan 2010 22:23 On Jan 23, 3:34 pm, Claus Yeh <phoebe.caulfiel...(a)gmail.com> wrote: > Dear SAS guru's, > > I have been using proc glm and proc logistic for a while now. these > procedures are great - alot of options and relatively easy to use. > > However, I always felt that they are a bit slow since they carry alot > of calculations and outputs that are not always needed. > > I am thinking about diving into Proc IML and write a more basic code > for regression. > > Has anyone tried that and got much faster run time? > > thank you, > claus In general I would not use IML to do a statistical analysis if a existing procedure could do it. The REG does more than calculating the beta in the following test sample.. 465 data t1; 466 do i = 1 to 50000; 467 x1=rannor(12345); 468 x2=rannor(12345); 469 x3=rannor(12345); 470 x4=rannor(12345); 471 x5=rannor(12345); 472 x6=rannor(12345); 473 x7=rannor(12345); 474 x8=rannor(12345); 475 x9=rannor(12345); 476 x0=rannor(12345); 477 y=x1+x2+x3+x4+ rannor(12345); 478 output; 479 end; 480 drop i; 481 run; NOTE: The data set WORK.T1 has 50000 observations and 11 variables. NOTE: DATA statement used (Total process time): real time 0.18 seconds cpu time 0.18 seconds 482 483 proc reg data=t1 noprint ; 484 model y=x1 x2 x3 x4 x5 x6 x7 x8 x9 x0/noint; 485 run; 486 quit; NOTE: PROCEDURE REG used (Total process time): real time 0.06 seconds cpu time 0.06 seconds 487 488 proc iml; NOTE: IML Ready 489 use t1; 490 read all var{x1 x2 x3 x4 x5 x6 x7 x8 x9 x0} into x; 491 read all var{y} into y; 492 beta=inv(x`*x) * x`*y ; 493 *print beta; 494 quit; NOTE: Exiting IML. NOTE: PROCEDURE IML used (Total process time): real time 0.07 seconds cpu time 0.07 seconds
First
|
Prev
|
Pages: 1 2 3 4 Prev: Partial Nesting in Proc Mixed Next: question asked in an Interview |