NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to US GEOLOGICAL SURVEY, Site 0034757169. NOTE: This session is executing on the WIN_98 platform. NOTE: SAS initialization used: real time 3.68 seconds 1 /**********************************************************************************/ 2 /* Name: logexpos.sas */ 3 /* Author: Terry Shaffer (terry_shaffer@usgs.gov) */ 4 /* SAS Version: 8 */ 5 /* Supporting files: aic_mac.sas */ 6 /* Date: 4 Dec 2002 */ 7 /* */ 8 /* This program illustrates 1) fitting of logistic-exposure nest-survival */ 9 /* models with PROC GENMOD, 2) computation of AIC model-selection criteria, */ 10 /* and 3) computation of model-averaged regression coefficients and unconditional */ 11 /* standard errors. The example involves evaluation of eight candidate models. */ 12 /* */ 13 /**********************************************************************************/ 14 15 /* Include the file containing the macros for computing model-selection criteria */ 16 /* and model-averaged regression coefficients. The user will need to modify the */ 17 /* %Include statement to point to the location of the aic_mac.sas file on their */ 18 /* computer. Detailed descriptions of the macros are given in the macro file. */ 19 %Include "i:\klett\macros\aic_mac.sas"; 339 340 /* Read in one observation for each interval of exposure on each nest. */ 341 /* expos = interval length; survive=1 (if the nest survives the interval, */ 342 /* survive=0 otherwise; nest_ht is a continuous explanatory variable; */ 343 /* parastat and patsize are categorical explanatory variables. */ 344 data chat; 345 length patsize $ 5; 346 input expos nest_ht parastat patsize survive; 347 if nest_ht=. then delete; 348 trials=1; 349 cards; NOTE: The data set WORK.CHAT has 292 observations and 6 variables. NOTE: DATA statement used: real time 0.38 seconds 661 ; 662 663 /* following code computes the effective sample size for computing AICc */ 664 Data N_eff(keep=n_eff); 665 Set Chat end=lastobs; 666 if survive=0 then n_eff+1; 667 else if survive=1 then n_eff+expos; 668 if lastobs then do; 669 put "The effective sample size for computing AICc is " n_eff ; 670 output; 671 end; 672 run; The effective sample size for computing AICc is 485 NOTE: There were 292 observations read from the data set WORK.CHAT. NOTE: The data set WORK.N_EFF has 1 observations and 1 variables. NOTE: DATA statement used: real time 0.00 seconds 673 674 /* following code fits a logistic-exposure constant-survival model */ 675 /* and creates three data sets containing information about the model */ 676 /* and the results. */ 677 proc genmod data=chat; 678 a=1/expos; 679 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 680 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 681 model survive/trials = / dist=bin; 682 ods output modelfit=modelfit; 683 ods output modelinfo=modelinfo; 684 ods output ParameterEstimates=ParameterEstimates; 685 title 'logistic-exposure, constant-survival model'; 686 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 2 observations and 8 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.76 seconds 687 688 /* following code invokes the aicc macro to read the data sets created by GENMOD */ 689 /* and compute aic values. AIC results will be stored in the data set named in */ 690 /* the dsn= statement. Parameter estimates will be stored in the data set named */ 691 /* in the estdsn= statement. model_dimension is set to 2 because the highest */ 692 /* order interaction in the suite of candidate models is 2 (parastat*patsize). */ 693 %aicc(dsn=chat_aic,estdsn=estimate,model=constant survival,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.10 seconds NOTE: There were 2 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 1 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 1 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 1 observations and 6 variables. NOTE: DATA statement used: real time 0.11 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 1 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 1 observations and 9 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: BASE data set does not exist. DATA file is being copied to BASE file. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: The data set WORK.CHAT_AIC has 1 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.11 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: BASE data set does not exist. DATA file is being copied to BASE file. NOTE: There were 1 observations read from the data set WORK.TEMP6. NOTE: The data set WORK.ESTIMATE has 1 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds 694 695 /* following code fits a logistic-exposure model with a parastat main effect */ 696 proc genmod data=chat; 697 class parastat; 698 a=1/expos; 699 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 700 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 701 model survive/trials = parastat / dist=bin; 702 ods output modelfit=modelfit; 703 ods output modelinfo=modelinfo; 704 ods output ParameterEstimates=ParameterEstimates; 705 title 'logistic-exposure, parasitism status main effect'; 706 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 4 observations and 9 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.17 seconds 707 708 /* Summarize and store the results from the above model */ 709 %aicc(dsn=chat_aic,estdsn=estimate,model=parastat main effect,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 4 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 3 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 3 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 3 observations and 6 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 3 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 3 observations and 9 variables. NOTE: DATA statement used: real time 0.06 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 2 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.10 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 3 observations read from the data set WORK.TEMP6. NOTE: 3 observations added. NOTE: The data set WORK.ESTIMATE has 4 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.05 seconds 710 711 /* following code fits a logistic-exposure model with a patsize main effect */ 712 proc genmod data=chat; 713 class patsize; 714 a=1/expos; 715 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 716 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 717 model survive/trials = patsize / dist=bin; 718 ods output modelfit=modelfit; 719 ods output modelinfo=modelinfo; 720 ods output ParameterEstimates=ParameterEstimates; 721 title 'logistic-exposure, patch size main effect'; 722 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 4 observations and 9 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.16 seconds 723 724 /* Summarize and store the results from the above model */ 725 %aicc(dsn=chat_aic,estdsn=estimate,model=patsize main effect,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 4 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 3 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 3 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 3 observations and 6 variables. NOTE: DATA statement used: real time 0.11 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 3 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 3 observations and 9 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 3 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.04 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 3 observations read from the data set WORK.TEMP6. NOTE: 3 observations added. NOTE: The data set WORK.ESTIMATE has 7 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds 726 727 /* following code fits a logistic-exposure model with a parastat and patsize main effects 727! */ 728 proc genmod data=chat; 729 class parastat patsize; 730 a=1/expos; 731 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 732 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 733 model survive/trials = parastat patsize / dist=bin; 734 ods output modelfit=modelfit; 735 ods output modelinfo=modelinfo; 736 ods output ParameterEstimates=ParameterEstimates; 737 title 'logistic-exposure, parastat and patsize main effect'; 738 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 6 observations and 9 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.17 seconds 739 740 /* Summarize and store the results from the above model */ 741 %aicc(dsn=chat_aic,estdsn=estimate,model=parastat and patsize main 741! effect,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 6 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 5 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 5 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 5 observations and 6 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 5 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 5 observations and 9 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 4 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 5 observations read from the data set WORK.TEMP6. NOTE: 5 observations added. NOTE: The data set WORK.ESTIMATE has 12 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.05 seconds 742 743 /* following code fits a logistic-exposure model with a parastat and patsize main effects 743! */ 744 /* and their interaction 744! */ 745 proc genmod data=chat; 746 class parastat patsize; 747 a=1/expos; 748 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 749 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 750 model survive/trials = parastat patsize parastat*patsize / dist=bin; 751 ods output modelfit=modelfit; 752 ods output modelinfo=modelinfo; 753 ods output ParameterEstimates=ParameterEstimates; 754 title 'logistic-exposure, main effects and interaction'; 755 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 10 observations and 10 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.16 seconds 756 757 /* Summarize and store the results from the above model */ 758 %aicc(dsn=chat_aic,estdsn=estimate,model=main effects and interaction,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 10 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 9 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 9 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 9 observations and 6 variables. NOTE: DATA statement used: real time 0.11 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 9 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 9 observations and 9 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 5 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.05 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 9 observations read from the data set WORK.TEMP6. NOTE: 9 observations added. NOTE: The data set WORK.ESTIMATE has 21 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds 759 760 /* following code fits a logistic-exposure model for nest_ht, a continuous covariate. 760! */ 761 proc genmod data=chat; 762 a=1/expos; 763 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 764 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 765 model survive/trials = nest_ht / dist=bin; 766 ods output modelfit=modelfit; 767 ods output modelinfo=modelinfo; 768 ods output ParameterEstimates=ParameterEstimates; 769 title 'logistic-exposure, nest_ht'; 770 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 3 observations and 8 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.16 seconds 771 772 /* Summarize and store the results from the above model */ 773 %aicc(dsn=chat_aic,estdsn=estimate,model=nest height only,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 3 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 2 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 2 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 2 observations and 6 variables. NOTE: DATA statement used: real time 0.10 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 2 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 2 observations and 9 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 6 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.05 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 2 observations read from the data set WORK.TEMP6. NOTE: 2 observations added. NOTE: The data set WORK.ESTIMATE has 23 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds 774 775 /* following code fits a logistic-exposure model with effects of parastat, patsize */ 776 /* and nest_ht. */ 777 proc genmod data=chat; 778 class parastat patsize; 779 a=1/expos; 780 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 781 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 782 model survive/trials = parastat patsize nest_ht / dist=bin; 783 ods output modelfit=modelfit; 784 ods output modelinfo=modelinfo; 785 ods output ParameterEstimates=ParameterEstimates; 786 title 'logistic-exposure, main effects and nest-height'; 787 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 7 observations and 9 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.15 seconds 788 789 /* Summarize and store the results from the above model */ 790 %aicc(dsn=chat_aic,estdsn=estimate,model=main effects and nest-height,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 7 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 6 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 6 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 6 observations and 6 variables. NOTE: DATA statement used: real time 0.10 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 6 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 6 observations and 9 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 7 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.06 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 6 observations read from the data set WORK.TEMP6. NOTE: 6 observations added. NOTE: The data set WORK.ESTIMATE has 29 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds 791 792 /* following code fits a logistic-exposure model with effects of parastat, patsize */ 793 /* parastat*patsize, and nest_ht. 793! */ 794 proc genmod data=chat; 795 class parastat patsize; 796 a=1/expos; 797 fwdlink link = log((_mean_**a)/(1-_mean_**a)); 798 invlink ilink = (exp(_xbeta_)/(1+exp(_xbeta_)))**expos; 799 model survive/trials = parastat patsize parastat*patsize nest_ht / dist=bin; 800 ods output modelfit=modelfit; 801 ods output modelinfo=modelinfo; 802 ods output ParameterEstimates=ParameterEstimates; 803 title 'logistic-exposure, main effects, interaction, and nest-height'; 804 run; NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: The data set WORK.PARAMETERESTIMATES has 11 observations and 10 variables. NOTE: The data set WORK.MODELINFO has 8 observations and 3 variables. NOTE: The data set WORK.MODELFIT has 5 observations and 4 variables. NOTE: PROCEDURE GENMOD used: real time 0.15 seconds 805 806 /* Summarize and store the results from the above model */ 807 %aicc(dsn=chat_aic,estdsn=estimate,model=main effects + interaction + 807! nest-height,model_dimension=2); NOTE: There were 5 observations read from the data set WORK.MODELFIT. NOTE: The data set WORK.TEMP has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 1 observations read from the data set WORK.N_EFF. NOTE: There were 8 observations read from the data set WORK.MODELINFO. NOTE: The data set WORK.TEMP2 has 1 observations and 3 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 11 observations read from the data set WORK.PARAMETERESTIMATES. NOTE: The data set WORK.TEMP4 has 10 observations and 2 variables. NOTE: The data set WORK.TEMP4A has 10 observations and 2 variables. NOTE: The data set WORK.TEMP4B has 10 observations and 6 variables. NOTE: DATA statement used: real time 0.11 seconds NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: There were 10 observations read from the data set WORK.TEMP4B. NOTE: The data set WORK.TEMP6 has 10 observations and 9 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 1 observations read from the data set WORK.TEMP. NOTE: There were 1 observations read from the data set WORK.TEMP2. NOTE: The data set WORK.TEMP3 has 1 observations and 10 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: Appending WORK.TEMP3 to WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.TEMP3. NOTE: 1 observations added. NOTE: The data set WORK.CHAT_AIC has 8 observations and 10 variables. NOTE: PROCEDURE APPEND used: real time 0.00 seconds NOTE: Appending WORK.TEMP6 to WORK.ESTIMATE. NOTE: There were 10 observations read from the data set WORK.TEMP6. NOTE: 10 observations added. NOTE: The data set WORK.ESTIMATE has 39 observations and 9 variables. NOTE: PROCEDURE APPEND used: real time 0.05 seconds 808 809 /* Compute AIC model selection criteria and Akaike weights*/ 810 %DeltaAic(DataIn=chat_aic,DataOut=chat_delta_aicc,Vari=aicc); NOTE: The data set WORK.MIN has 1 observations and 1 variables. NOTE: PROCEDURE UNIVARIATE used: real time 0.00 seconds NOTE: There were 8 observations read from the data set WORK.CHAT_AIC. NOTE: There were 1 observations read from the data set WORK.MIN. NOTE: The data set WORK.AIC2 has 8 observations and 13 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 8 observations read from the data set WORK.AIC2. NOTE: The data set WORK.AIC2 has 8 observations and 13 variables. NOTE: PROCEDURE SORT used: real time 0.11 seconds NOTE: The data set WORK.WDENOMINATOR has 1 observations and 1 variables. NOTE: PROCEDURE UNIVARIATE used: real time 0.00 seconds NOTE: There were 1 observations read from the data set WORK.WDENOMINATOR. NOTE: There were 8 observations read from the data set WORK.AIC2. NOTE: The data set WORK.CHAT_DELTA_AICC has 8 observations and 15 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 8 observations read from the data set WORK.CHAT_DELTA_AICC. NOTE: PROCEDURE PRINT used: real time 0.04 seconds 811 812 /* Compute model-averaged estimates and unconditional standard errors */ 813 %Modelavg(estimate=estimate, Akaike=chat_delta_aicc, DataOut=Model_Averaged_Estimates, 813! model_dimension=2); NOTE: 29 observations with duplicate key values were deleted. NOTE: There were 39 observations read from the data set WORK.ESTIMATE. NOTE: The data set WORK.ALLCOMBOS has 10 observations and 3 variables. NOTE: PROCEDURE SORT used: real time 0.06 seconds NOTE: There were 39 observations read from the data set WORK.ESTIMATE. NOTE: The data set WORK.ESTIMATE has 39 observations and 9 variables. NOTE: PROCEDURE SORT used: real time 0.04 seconds NOTE: There were 39 observations read from the data set WORK.ESTIMATE. NOTE: The data set WORK.ESTIMATOR has 39 observations and 10 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 39 observations read from the data set WORK.ESTIMATOR. NOTE: The data set WORK.ESTIMATOR has 39 observations and 10 variables. NOTE: PROCEDURE SORT used: real time 0.00 seconds NOTE: The data set WORK.NMODELS has 1 observations and 1 variables. NOTE: PROCEDURE UNIVARIATE used: real time 0.04 seconds NOTE: There were 1 observations read from the data set WORK.NMODELS. NOTE: There were 10 observations read from the data set WORK.ALLCOMBOS. NOTE: The data set WORK.ALLCOMBOS2 has 80 observations and 5 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 80 observations read from the data set WORK.ALLCOMBOS2. NOTE: The data set WORK.ALLCOMBOS2 has 80 observations and 5 variables. NOTE: PROCEDURE SORT used: real time 0.05 seconds NOTE: There were 80 observations read from the data set WORK.ALLCOMBOS2. NOTE: There were 39 observations read from the data set WORK.ESTIMATOR. NOTE: The data set WORK.ESTIMATE2 has 80 observations and 9 variables. NOTE: DATA statement used: real time 0.00 seconds NOTE: There were 8 observations read from the data set WORK.CHAT_DELTA_AICC. NOTE: The data set WORK.W1 has 8 observations and 2 variables. NOTE: PROCEDURE SORT used: real time 0.04 seconds NOTE: There were 8 observations read from the data set WORK.W1. NOTE: The data set WORK.W2 has 8 observations and 3 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 8 observations read from the data set WORK.W2. NOTE: There were 80 observations read from the data set WORK.ESTIMATE2. NOTE: The data set WORK.ESTIMATE3 has 80 observations and 11 variables. NOTE: DATA statement used: real time 0.04 seconds NOTE: There were 80 observations read from the data set WORK.ESTIMATE3. NOTE: The data set WORK.MODEL_AVG has 10 observations and 4 variables. NOTE: PROCEDURE SUMMARY used: real time 0.05 seconds NOTE: There were 80 observations read from the data set WORK.ESTIMATE3. NOTE: The data set WORK.ESTIMATE3 has 80 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 0.05 seconds NOTE: There were 10 observations read from the data set WORK.MODEL_AVG. NOTE: There were 80 observations read from the data set WORK.ESTIMATE3. NOTE: The data set WORK.ESTIMATE4 has 80 observations and 13 variables. NOTE: DATA statement used: real time 0.10 seconds NOTE: There were 80 observations read from the data set WORK.ESTIMATE4. NOTE: The data set WORK.OUTDATA has 10 observations and 6 variables. NOTE: PROCEDURE SUMMARY used: real time 0.05 seconds NOTE: There were 10 observations read from the data set WORK.OUTDATA. NOTE: The data set WORK.MODEL_AVERAGED_ESTIMATES has 10 observations and 7 variables. NOTE: DATA statement used: real time 0.05 seconds NOTE: There were 10 observations read from the data set WORK.MODEL_AVERAGED_ESTIMATES. NOTE: PROCEDURE PRINT used: real time 0.00 seconds