0 f. l$ b6 k. e) i0 d1 I D! u, K- n0 Z! j, C' D7 [
library(Design) 5 z" C( P2 W4 P# }1 D> reri <- function(datsam)1 B b# B' z* Z
+ {fitlr <- glm(DM.0813 ~ smoking * rs163184, famliy=binomial, data=datsam)* _& E7 g+ u) w) F
+ reri <- exp(fitlr$coef[2]+fitlr$coef[3]+fitlr$coef[4]) - exp(fitlr$coef[2]) -exp(fitlr$coef[3]) + 1} 9 U2 |. O+ V# K2 x Last expression in function is an assignment! C1 {9 m4 r4 h/ `( q" f2 x
(You probably wanted to return the left-hand side)2 n$ i" ~' G4 b( r- r
in: reri <- exp(fitlr$coef[2] + fitlr$coef[3] + fitlr$coef[4]) - exp(fitlr$coef[2]) - exp(fitlr$coef[3]) + 1& x& y) N' r" `4 r o! D9 B; o; ]: u
> summary.bootstrap(bootstrap(smoking, reri(smoking), B=10000), probs=c(0.025,0.5, 0.975)) - b5 x1 o, p2 Q
Warning messages:. _# v% m5 w) S! _$ g) A
Numerical expression has 7028 elements: only the first used in: model.frame(formula, data, na.action, dots) 2 f, u7 B' K. sProblem: Object "DM.0813" not found 8 h7 b) [; U5 q# O/ ^) F2 r% `Use traceback() to see the call stack # G4 P$ v2 A X4 P# j ( r4 _. H9 E! l, Q7 e & S& G3 q3 J% i2 b. o( p, v u不明白这个错误什么意思,小白求指导……. c' B8 L8 p# e9 u
6 z& }) o5 ?' w# X/ k% @ : g4 c' H9 R; v8 l3 W* F- W