statistics - Understanding co-efficients of logistic regression R -
this question understanding logistic regression output using r
here sample data frame:
drugpairs adverseevent y n 1 rebetol + pegintron nausea 29 1006 2 rebetol + pegintron anaemia 21 1014 3 rebetol + pegintron vomiting 14 1021 4 ribavirin + pegasys nausea 5 238 5 ribavirin + pegasys anaemia 12 231 6 ribavirin + pegasys vomiting 1 242 7 ribavirin + pegintron nausea 15 479 8 ribavirin + pegintron anaemia 7 487 9 ribavirin + pegintron vomiting 9 485
this describes number of times particular drug pair has caused medically adverse event. (y=yes, n=no). ran logistic regression on data in r using following commands:
mod.form="cbind(y,n) ~ drugpairs * adverseevent" glmhepa.out=glm(mod.form, family=binomial(logit), data=hepatitis.df)
the summary output follows (only showing co-efficients table)
estimate std. error z value (intercept) -3.8771 0.2205 -17.586 drugpairsribavirin + pegasys 0.9196 0.3691 2.491 drugpairsribavirin + pegintron -0.3652 0.4399 -0.830 adverseeventnausea 0.3307 0.2900 1.140 adverseeventvomiting -0.4123 0.3479 -1.185 drugpairsribavirin + pegasys:adverseeventnausea -1.2360 0.6131 -2.016 drugpairsribavirin + pegintron:adverseeventnausea 0.4480 0.5457 0.821 drugpairsribavirin + pegasys:adverseeventvomiting -2.1191 1.1013 -1.924 drugpairsribavirin + pegintron:adverseeventvomiting 0.6678 0.6157 1.085
i understand co-efficients give probabilistic odds. curious however, why there no co-efficients adverseeventanaemea , why there no co-efficient anycombination of drugs , adverse event anaemea? (the last 4 rows combination effects of drugs , adverse events)
the coefficients discrete variables effect differences (otherwise known contrasts). baseline taken lowest level of factor in sort order of hte levels vector, alphabetically sorted default. cna change sort ort change refence point , change coefficeints. interactions terms such have in teh second model never find useful @ coefficients thems selves. it's going better @ predicted effects selected comparisons.
and ... don't forget logistic modles coefficients estimated on log0odds scale. make use of predict more helpful because predict.glm
using type= "response"
allows report effects on probability scale.
Comments
Post a Comment