r - Logistic Regression in SAS -
i have data below.
i wish apply logistic regression. here response variable proportion of dead. here how analyzed data in r:
dose <- c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610,1.8839) total<- c(59,60,62,56,63,59,62,60) dead<- c(6,13,18,28,52,53,61,60) y <- dead/total lineer.model <- glm(y ~ dose,family=binomial(link=logit), weights=total)
i want same analysis in sas. can please me that? here did in sas, thats not working. idea why
data beetle_data; input dose total dead; y = dead/total; datalines; 1.6907 59 6 1.7242 60 13 1.7552 62 18 1.7842 56 28 1.8113 63 52 1.8369 59 53 1.8610 62 61 1.8839 60 60 ; proc logistic data=beetle_data; model y =dose/link=logit dist=binomial; run;
based on this sas document (google "sas proc logistic binomial") looks should it:
proc genmod data=beetle; model dead/total=dose / link=logit dist=binomial;
based on this looks data above same, standard bliss (1935) data set referred in link above.
Comments
Post a Comment