Hi
I have fit a model, and estimated the risk difference(RD) for the
interaction term,but I don't know how to estimate the standard error and
confidence interval for RD. The code are as follows
table(dat$A3)
# 0 1
#167762 4444
table(dat$A17)
# 0 1 2 3
#129982 23429 15880 2915
table(dat$A10)
# 0 1
# 39871 132335
table(dat$A10,dat$A17)
# 0 1 2 3
# 0 29833 5626 3685 727
# 1 100149 17803 12195 2188
fm.add = glm(A3~ A10 + A17 +A10*A17,data=dat, family=binomial(link
"identity"))
coefs.fm.add = summary(fm.add)$ coefficients
coefs.fm.add
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.0343244059 0.001054068 32.5637454 1.337835e-232
A101 -0.0125967800 0.001150347 -10.9504155 6.614351e-28
A171 0.0070904537 0.002857888 2.4810117 1.310101e-02
A172 -0.0039309187 0.003017991 -1.3024951 1.927472e-01
A173 -0.0123161528 0.005542338 -2.2221944 2.627017e-02
A101:A171 0.0006713323 0.003160276 0.2124284 8.317728e-01
A101:A172 0.0066395373 0.003357877 1.9773022 4.800748e-02
A101:A173 0.0180108304 0.006566514 2.7428297 6.091227e-03
#estimate 'Risk difference of A10 when A10 = 1,A17=1'
rd.1.1= coefs.fm.add[2,1] + coefs.fm.add[3,1] + coefs.fm.add[6,1];
#estimate 'Risk difference of A10 when A10 = 1,A17=2'
rd.1.2= coefs.fm.add[2,1] + coefs.fm.add[4,1] + coefs.fm.add[7,1];
#estimate 'Risk difference of A10 when A10 = 1,A17=3'
rd.1.3= coefs.fm.add[2,1] + coefs.fm.add[5,1] +
coefs.fm.add[8,1];> rd.1.1
[1] -0.004834994> rd.1.2
[1] -0.009888161> rd.1.3
[1] -0.006902102
Who can help me? Thanks.
--
Zongfu Cao
Peking Union Medical College
[[alternative HTML version deleted]]