Resources

Basic Models

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: hpqlme01.sas
 Description: Example program from SAS/HPA User's Guide,
              The HPQLIM Procedure
       Title: Basic Models
     Product: SAS/HPA Software
        Keys: Censored data analysis
        PROC: HPQLIM
       Notes:

--------------------------------------------------------------*/

  data simulate;
       call streaminit(12345);
       array vars x1-x7;
       array parms{7}  (3 4 2 4 -3 -5 -3);

       intercept=2;

      do i=1 to 5000000;
          sum_xb=0;
          do j=1 to 7;
             vars[j]=rand('NORMAL',0,1);
             sum_xb=sum_xb+parms[j]*vars[j];
          end;
          y=intercept+sum_xb+400*rand('NORMAL',0,1);
          if y>400 then y=400;
          if y<0 then y=0;
          output;
       end;
    keep y x1-x7;
    run;

 proc hpqlim data=simulate ;
    performance nthreads=2 nodes=1 details
                 host="&GRIDHOST" install="&GRIDINSTALLLOC";
    model y=x1-x7 /censored(lb=0 ub=400);
 run;

 proc hpqlim data=simulate ;
    performance nthreads=8 nodes=10 details
                 host="&GRIDHOST" install="&GRIDINSTALLLOC";
    model y=x1-x7 /censored(lb=0 ub=400);
run;