04 November 2021 1 4K Report

How to test nonlinearity and fit exposure-response curves between continuous exposures and outcomes with linear mixed models with natural cubic splines in R software.

When I fit a linear mixed model with y as dependent variable, var1 as independent variable, var2, var3, and var4... as covariates, and id as random intercept, with the model was fitted as "lmer( formula = y ~ ns(var1,df=4) + var2 + var3 + vars4... + (1|id), data=data)", then how could I plot the exposure-response curves and test the non-linear significance? Great thanks for your answers.

More Yubo Ma's questions See All
Similar questions and discussions