mayoverse / arsenal

An Arsenal of 'R' Functions for Large-Scale Statistical Summaries
https://mayoverse.github.io/arsenal/
223 stars 14 forks source link

modelsum: subset feature not quite right #14

Closed eheinzen closed 7 years ago

eheinzen commented 7 years ago
## This works
subgp <- d1$gender=='M'
tab2 <- modelsum(case ~ dx1 + dx2 + dx3 + dx4 + dx5 + dx6 + dx7 + dx8 + dx9 + dx10 + dx11 + dx12 + dx13 + dx14 + dx16 + dx17 + ch.count + ch.index + ch.cmort, adjust= ~bmi.calc, family="binomial", data=d1, subset=subgp)

## This does not, but it should
tab2 <- modelsum(case ~ dx1 + dx2 + dx3 + dx4 + dx5 + dx6 + dx7 + dx8 + dx9 + dx10 + dx11 + dx12 + dx13 + dx14 + dx16 + dx17 + ch.count + ch.index + ch.cmort, adjust= ~bmi.calc, family="binomial", data=d1, subset=gender=='M')
eheinzen commented 7 years ago

Can't reproduce this example, but will write a test for it cc @bethatkinson

eheinzen commented 7 years ago

Checks failed. Whoops