0

I am trying to run tbl_regression() on lme4 models. In R Markdown, the p-values can be seen in the output there. However, when I try to compile to a pdf or html, the p-values disappear, while the confidence intervals stay. I have no clue what is going wrong and would appreciate any help with this. Additionally, any help with keeping tbl_regression output from moving around in pdf compilers would be much appreciated.

fit <- lmer(va_int ~ (MMP9 == "TT") + age + Sex + BMI + smoking + (1 | id), 
            data = eye_data)
cat("Sample Size (n): ", nobs(fit), "\n")
tbl_regression(fit)

Is the code being ran. For note, the issues still occurred without results="asis" being present. In R Markdown, the p-value column shows up. But once the document is compiled, the p-value column completely disappears from tbl_regression output.

I have also attempted a regression on the mtcars dataset and had no issues printing p-values there. For whatever reason, it's the dataset I'm working with that will not print p-values.

The compiled output looks like this: enter image description here

Whereas in R Markdown it looks like this:

enter image description here

New contributor
ZSteinmetz120 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3
  • 2
    Welcome to SO. You maximise your chance of getting a useful answer if you provide a minimal reproducible example. This post may help. Commented 11 hours ago
  • 1
    If you think the data are causing the problem, it would be useful to share those data using something like dput(eye_data) and editing your question to paste the output (it stars with structure(...) Commented 7 hours ago
  • As an aside, you dont really need the p-values anyway as the CI's will contain the same information Commented 7 hours ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.