Learn R Programming

midr (version 0.5.2)

print.mid: Print MID Models

Description

print.mid() is an S3 method for "mid" objects that prints a concise summary of a fitted MID model.

Usage

# S3 method for mid
print(x, digits = max(3L, getOption("digits") - 2L), main.effects = FALSE, ...)

Value

print.mid() returns the original "mid" object invisibly.

Arguments

x

a "mid" object to be printed.

digits

an integer specifying the number of significant digits for printing.

main.effects

logical. If TRUE, the MID values of each main effect are also printed.

...

arguments to be passed to other methods (not used in this method).

Details

By default, the print() method for "mid" objects provides a quick overview of the model structure by listing the number of main effect and interaction terms. If main.effects = TRUE is specified, the method will also print the contribution of each main effect at its sample points, providing a more detailed look at the model's components.

See Also

interpret, summary.mid

Examples

Run this code
data(cars, package = "datasets")
mid <- interpret(dist ~ speed, cars)

# Default print provides a concise summary
print(mid)

# Setting main.effects = TRUE prints the contributions of each main effect
print(mid, main.effects = TRUE)

Run the code above in your browser using DataLab