This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Logistic Regression Using Plink Files

Hi All,

I am trying to determine the relative effect size of a set of variants using logistic regression (in R?). I have plink files to start from. Since this is a pretty common problem I was wondering if there is a straightforward R pipeline to do this. I searched around but so far no luck.

Thank you for any leads. General leads for good packages to analyze plink files in R also highly appreciated! Thanks!

plink r

Thank for your reply. I have tried plink's --logistic, but I dont think I am able to calculate nagelkerke's R^2 using plink. I may be mistaken though, and I am looking into this more now. Thanks again!

1 answer

For simple access to analyze non-huge .bed or .ped data in R, try plink --recode options, such as

cmd <- "plink --bfile UC_N10_M5_P1_C1 --recodeAD --out plink"
system(cmd)
res <- read.table("plink.raw", header=TRUE)

For more details read the manual.

Another option apparently exists to extend PLINK with RSERV (I've never used it). Especially for large datasets it will be faster/easier to use plink directly for any analyses where that is possible, instead of transferring data into R (as suggested by zx8754).

Log in to answer this question.