* Sample code for fitting logistic-exposure models (Shaffer 2003) to * interval nest-visit data. * * Variables are as follows: * * Ifate = 0 if nest fails the interval, and 1 if it survives. * Trials = 1 in all cases. * Avgage = age (d) of the nest at interval midpoint. * PctGr = proportion of grassland cover. * t = interval length (d) * * Macros for generating AIC analyses and model-averaged parameter * estimates are available from * http://www.npwrc.usgs.gov/resource/tools/nestsurv/nestsurv.htm *; Proc Genmod Data=Mall; Fwdlink link = log((_mean_**(1/t))/(1-_mean_**(1/t))); Invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**t; Model Ifate/Trials = Avgage PpnGr / Dist=bin; Ods output modelfit=modelfit; Ods output modelinfo=modelinfo; Ods output ParameterEstimates=ParameterEstimates; Title 'b0 + b1*avgage + b2*pctgr4'; Run;