* This program reads the MARK input file shown in Table 3 and creates a SAS * data set that can be analyzed with Proc Genmod or Proc Nlmixed. * Because the MARK format does not contain information on all intermediate visits * to a nest, a maximum of 2 records is generated for each nest.; data mark2sas; array age(89) age1-age89; Infile 'C:\My Documents\nest success\MallMARK.inp' firstobs=2 lrecl=750; Input junk $ id junk $ firstday lastdaylive lastday markfate freq age1-age89 Robel PpnGr NatGr PlCov Wetl Road; If markfate=0 then do; /* successful nest - generate 1 interval with ifate=1 */ ifate=1; sdate=firstday; t = lastday - firstday; sage = age{sdate}; output; end; If markfate=1 then do; /* unsuccessful nest - generate 1 interval with ifate=1 and 1 interval with ifate=0 */ ifate=1; sdate=firstday; t = lastdaylive - firstday; sage = age{sdate}; output; ifate=0; sdate=lastdaylive; t = lastday -lastdaylive; sage = age{sdate}; output; end; keep id Robel PpnGr NatGr PlCov Wetl Road ifate sdate t sage; run; proc print; run;