Learn R Programming

TRES (version 1.1.1)

plot.Tenv: Plot coefficients and p-value for Tenv object.

Description

Plot method for object returned from TRR.fit and TPR.fit functions.

Usage

# S3 method for Tenv
plot(
  x,
  level = 0.05,
  main = paste0("Coefficient plot ", "(", x$method, ")"),
  main_p = paste0("P value plot ", "(", x$method, ")"),
  xticks,
  yticks,
  ...
)

Arguments

x

An object of class "Tenv", as from TPR.fit or TRR.fit.

level

Significant level of p-value. Default is 0.05.

main

Title to coefficient plot.

main_p

Title to \(p\)-value plot.

xticks

Set tick labels of the x-axis

yticks

Set tick labels of the y-axis

...

Other parameters to be passed through to plotting functions.

Details

coef(x) must be a two-way tensor or a matrix. For the object return from TPR.fit, only the coefficients plot is displayed. For the object return from TRR.fit, both the coefficients plot and p-value plot are displayed.

See Also

TRR.fit, TPR.fit

Examples

Run this code
# NOT RUN {
 data("bat")
 x <- bat$x
 y <- bat$y
 fit <- TRR.fit(x, y, method="standard")
 plot(fit)

 ## Set xticks and yticks
 plot(fit, xticks = seq(0, 10, length.out=5), yticks = seq(0, 10, length.out=5))

 ## Change the significant level to 0.1
 plot(fit, level = 0.1)
# }

Run the code above in your browser using DataLab