**********************************************************;;;;; ***** ;;;;; ***** SAS program busin.sas for entering data to case ;;;;; ***** study on Bus insurance ;;;;; ***** No functionality guaranteed - use at your own risk! ;;;;; ***** ;;;;; **********************************************************;;;;; ***** Create a libref (change path to your own) ;;;;; libname bus '\My Documents\NonLifeGLM\bus'; ***** Read data from the file busscase.txt (note the extra s) ;;;;; ***** And compute the claim frequency ;;;;; data bus.busfile; infile 'H:\Windows\My Documents\\busscase.txt'; input @1 zon BEST3. @4 bussald BEST3. @7 kundnr BEST4. @11 antavt BEST4. @15 dur BEST8. @23 antskad BEST4. @27 skadkost BEST8.; if dur>0; dur=dur/365.25; claimfreq=antskad/dur; format claimfreq PERCENT10.2 dur 6.2; run; ***** THE END! ;;;;;