I want to save my output regression of lmer() from lme4 R package. Is there any good way for this to get the output below in a table e.g .csv or .txt or .html etc?
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 103.989 5.617 139.000 18.52 < 2eā16 ***
age ā0.172 0.177 139.000 ā1.03 0.304
bmi 0.597 0.229 139.000 2.56 0.012 *
gender 1.019 0.325 139.000 3.15 0.002 **
I tried, tab_model() from library sjplot in R, but it does not give the SE, df and t values. I would like to save the output above. I appreciate any advice.
Make sure the class of your model object is
lmerModand it will work withstargazer, which exports beautiful formatted regression tables to plain text, html, latex, etc. and has all sort of options to customize those tables (see the docs).