[R] Difficulty getting standard deviation of ALL odds ratios with glm function, logistic regression, need cov of parameters
gfox at stat.rice.edu
Wed Jul 27 00:37:46 CEST 2005
I am trying to do logistic regression with a categorical predictor variable
with the glm() function, family=binomial. Using glm() I would like to be
able to calculate the confidence intervals of all three possible odds ratios
for a factor (the factor has three categories). Three categories imply two
columns of 0's and 1's in the design matrix, and two parameter estimates
with their SE's. Two confidence intervals for odds ratios can be easily
calculated, the third confidence interval can be calculated if I know the SE
of B1-B2, but this requires the covariance matrix of parameter estimates,
which is not given to my knowledge.
My initial thought was that Cov(B1,B2)=0, but this cannot be true or the
variance estimates would depend on how you set up the design matrix (the
factor symbolized by 0,0 would always have a higher SD).
Please help me find the covariance of the parameter estimates.
Thank you in advance,
More information about the R-help