Large fixed effects binomial regression in R

后端 未结 3 1691
别跟我提以往
别跟我提以往 2021-02-01 07:56

I need to run a logistic regression on a relatively large data frame with 480.000 entries with 3 fixed effect variables. Fixed effect var A has 3233 levels, var B has 2326 level

3条回答
  •  难免孤独
    2021-02-01 08:41

    Check out

    glmmboot{glmmML}
    

    http://cran.r-project.org/web/packages/glmmML/glmmML.pdf

    There is also a nice document by Brostrom and Holmberg (http://cran.r-project.org/web/packages/eha/vignettes/glmmML.pdf)

    Here is the example from their document:

    dat <- data.frame(y = rbinom(5000, size = 1, prob = 0.5),
                   x = rnorm(5000), group = rep(1:1000, each = 5))
    fit1 <- glm(y ~ factor(group) + x, data = dat, family = binomial)
    
    require(glmmML)
    fit2 <- glmmboot(y ~ x, cluster = group,data = dat)
    

    The computing time difference is "huge"!

提交回复
热议问题