kaz-yos / tableone

R package to create "Table 1", description of baseline characteristics with or without propensity score weighting
https://cran.r-project.org/web/packages/tableone/index.html
214 stars 40 forks source link

tableone for matched case-control study #8

Open WHMan opened 8 years ago

WHMan commented 8 years ago

Thank you for this helpful package.

Since my data comes from a 1:2 matched case-control study, the available statistical methods in tableone are not appropriate. I want to use a linear mixed model (nlme) for continuous variables and conditional logistic regression (clogit) for categorical variables. I've tried looking into the separate functions (https://github.com/kaz-yos/tableone/tree/master/R) to see how I can use these methods for tableone, but I can't think of any way how to do this. Any advise on this would be greatly appreciated.

Thank you in advance for your response.

kaz-yos commented 8 years ago

That's an interesting use case, but it is beyond the ability of this package as of now. I think what you need is to have p-values generated from these methods rather than the classic test procedures used in the package. If you still find the summary statistics (means, sd, etc) useful one thing you can do is to generate the table without p-values (you can extract a matrix object please see ?print.TableOne) and column combine a vector of p-values obtained from these models (which you have to do outside tableone).

WHMan commented 8 years ago

Thank you for your swift response! I did not know about the matrix-object. I successfully combined your summary table with the p-values I generated.