Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(glmmLasso)
- library(tidyverse)
- data(knee)
- knee.scaled <- knee %>% mutate(across(-c("id"),scale))
- # The output of this shows penalty applied to time (i.e. the first term in the formula)
- glmmLasso(pain ~ time + th + age:sex,rnd=list(id=~1),lambda=1e6,data=knee.scaled,control=list(index=c(NA, NA, 1)))
- # The output of this shows the penalty applied to time (i.e. the first term in the formula)
- glmmLasso(pain ~ time + th + age:sex,rnd=list(id=~1),lambda=1e6,data=knee.scaled,control=list(index=c(1, NA, NA)))
- # The output of this shows penalty applied to age (i.e. the last term in the formula)
- glmmLasso(pain ~ time + th + age,rnd=list(id=~1),lambda=1e6,data=knee.scaled,control=list(index=c(NA, NA, 1)))
Add Comment
Please, Sign In to add comment