print.margin | R Documentation |
Print method for class "'margin'"
## S3 method for class 'margin'
print(x, ...)
x |
An object of class "'margin'" resulting from a call to margin |
... |
Further arguments passed from other methods |
No return, called for effects
## fit a model using glmmTMB
fit <- glmmTMB::glmmTMB(y ~ Treatment + x1 + x2 + x3 + x4 + (1|Cluster),
data = trial_data, family = binomial(link="logit"),REML = TRUE)
## relative risk, average over random effects and fixed effects
margin(fit,
x = "Treatment",
type = "ratio",
average = c("x1","x2","x3","x4"),
re = "average",
se="GLS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.