Learn R Programming

causalSLSE (version 0.4-1)

print: Print Methods

Description

Print methods for different objects from the package.

Usage

# S3 method for cslseModel
print(x, which=c("Model", "selKnots", "Pvalues"),
                           digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for slseModel
print(x, which=c("Model", "selKnots", "Pvalues"),
                           digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for cslse
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for cslseFit
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for slseFit
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for summary.cslse
print(x, digits = max(3L, getOption("digits") - 3L),
                              signif.stars = getOption("show.signif.stars"),
                              beta=FALSE, knots = FALSE,...)
# S3 method for summary.cslseFit
print(x, groups, digits = max(3L, getOption("digits") - 3L),
                                signif.stars = getOption("show.signif.stars"),
                                ...)
# S3 method for summary.slseFit
print(x, digits = max(3L, getOption("digits") - 3L),
                                signif.stars = getOption("show.signif.stars"),
                                ...)
# S3 method for slseKnots
print(x, header=c("None", "All", "Select"),
                          digits = max(3L, getOption("digits") - 3L), ...)

Value

All methods return NULL invisibly.

Arguments

x

A model or a fit object.

digits

The number of digits to print.

signif.stars

Should we print the significant stars?

beta

Should we print the coefficient matrix of the basis functions?

knots

Should we print the set of knots?

which

What info we should print? It prints a summary of the model when set to "Model", the current knots when set to "selKnots" and the p-values and initial knots when set to "Pvalues". For the latter, it is only available when a knots selection method has been applied to the object.

header

What description of the object should be printed.

groups

The names of the group to be printed. By default, they are all printed.

...

Argument for other types of objects.

Examples

Run this code

## For cslseModel objects

data(simDat3)
mod1 <- cslseModel(Y ~ Z | ~ X1 * X2, data = simDat3)
print(mod1)

## For cslse objects

causal <- causalSLSE(mod1)
print(causal)

## For summary.cslse objects

s <- summary(causal)
print(s)

## For cslseFit objects

fit <- estSLSE(mod1)
print(fit)

## For summary.cslseFit objects

summary(fit)

Run the code above in your browser using DataLab