disp('Running MATLAB script file SZhazard1.m') ;
%
%    For studying hazard SiZer,
%    
%

idata = 2 ;     %  1  Device Put Data from Jiang, Jian-Cheng
                %  2  Stanford Heart Transplant



ipart = 1 ;     %  1 Standard density estimation SiZer



%  Load data
%
if idata == 1 ;

  fid = fopen('/matlab/steve/data/device.put.dat','rt') ;
          %  'rt' is for "read only" and "text"

    [vdata,cnt] = fscanf(fid,'%f') ;

  fclose(fid) ;

  savestr = 'SZhazard1DeviceLife' ;
  titstr = 'Device Lifetimes' ;


elseif idata == 2 ;

  fid = fopen('/matlab/steve/data/stanford.dat','rt') ;
          %  'rt' is for "read only" and "text"

    [vdata,cnt] = fscanf(fid,'%f') ;

  fclose(fid) ;

  nobs = cnt / 2 ;
  vcensor = vdata(1:nobs) ;
  vdata = vdata((nobs+1):cnt) ;

  savestr = 'SZhazard1HeartTrans' ;
  titstr = 'Stanford Heart transplants' ;


end ;    %  of idata if-block



figure(1) ;
clf ;



%  Do Main Calculation
%
if ipart == 1 ;    %  Standard Density estimation SiZer

  paramstruct = struct('iout',3,...
                       'imovie',0,...
                       'savestr',savestr,...
                       'famoltitle',titstr) ;

  sizer2(vdata,paramstruct) ;



end ;    %  of ipart if-block



