Learn R Programming

marginme (version 0.1.0)

summary.margin: Summarises the marginal output

Description

Summary method for "`margin`" class

Usage

# S3 method for margin
summary(object, ...)

Value

No return, called for effects

Arguments

object

An object of class "`margin`" resulting from a call to margin

...

Further arguments passed from other methods

Examples

Run this code
## 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
m1 <- margin(fit,
       x = "Treatment",
       type = "ratio",
       average = c("x1","x2","x3","x4"),
       re = "average",
       se="GLS")
summary(m1)

Run the code above in your browser using DataLab