# \donttest{
# Simple variable specification (formula-style with +)
vars(income + education)
# Single variable
vars(income)
# Interactions
vars(income * education) # expands to income + education + income:education
vars(income:education) # interaction only
# Transformations
vars(I(income^2)) # squared term
vars(income + I(income^2)) # linear and squared
# Mix free and fixed variables
vars(fix(exposure, 1.0) + income + education)
# Use in mm() specification
mm(
id = id(pid, gid),
vars = vars(rile + ipd),
fn = fn(w ~ 1/n),
RE = FALSE
)
# }
Run the code above in your browser using DataLab