0

I read the following article: MAYFIELD LOGISTIC REGRESSION: A PRACTICAL APPROACH FOR ANALYSIS OF NEST SURVIVAL and it offers a SAS code (below) to fit a logistic model:

proc logistic data = {data set};
   model FAIL/OBSDAYS = MIDHT SNAGBA
         VERTDENS; 
run;

In this model, the objective is to estimate the daily survival rate of nests. So, the response variable (FAIL) is the fate of nests (0=succeful, 1=fail), OBSDAYS is the time of exposure of nests, MIDHT, SNAGBA, and VERTDENS are covariates. I understand perfectly the second part of the model, but I have doubts about configuring the response variable in this model in R. Would it be appropriate to set it as follows in R?:

m1<-glm(fail~MIDHT+SNAGBA+VERTDENS, data=data set, family="binomial")
  • No, that will not be correct. Try `glm(fail / obsdays ~ MIDHT + SNAGBA + VERTDENS, data=data, family = "binomial")` Note your data=data set is also incorrect. – Reeza Apr 13 '21 at 01:36
  • If Fail is 0/1 then the SAS code is wrong. If the FAIL is a count value and OBSDAYS is the # of trials, the SAS code is correct. – Reeza Apr 13 '21 at 01:41
  • Thank you very much for your response and comments. I will better review the article that proposes the SAS code. For now, the example has been of great help to adjust the model. – Jesus Zuñiga Palacios Apr 13 '21 at 14:39

0 Answers0