plot.Tenv {TRES} | R Documentation |
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 class 'Tenv'
plot(
x,
level = 0.05,
main = paste0("Coefficient plot ", "(", x$method, ")"),
main_p = paste0("P value plot ", "(", x$method, ")"),
xlab = "",
ylab = "",
axes = TRUE,
ask = TRUE,
...
)
Arguments
x |
An object of class |
level |
The significant level of p-value. Default is 0.05. |
main |
The title of coefficient plot. |
main_p |
The title of |
xlab |
The title of x-axis. |
ylab |
The title of y-axis. |
axes |
A logical value specifying whether the axes should be drawn. |
ask |
A logical value. If it is TRUE (default), user is prompted before the second plot is shown (if exists). |
... |
Other parameters to be passed to the plotting functions. |
Details
coef(x)
must be a two-way tensor or a matrix.
Since p
-value depend on \widehat{\mathrm{cov}}^{-1}\{\mathrm{vec}(\mathbf{X})\}
which is unavailable for the ultra-high dimensional \mathrm{vec}(\mathbf{X})
in tensor predictor regression (TPR), the p
-value plot is not provided for the object returned from TPR.fit
.
Therefore, for the object return from TPR.fit
, only the coefficients plot is displayed. And for the object return from TRR.fit
, both the coefficients plot and p
-value plot are displayed.
main
and main_p
control the titles of coefficient plot and p
-value plot separately. Some other arguments used in function graphics::image
, e.g., xlim, ylim, zlim, col, xaxs, yaxs, etc.,
can be passed to ...
ask
can be set as FALSE
if the pause before the second plot is not preferred. If x
is an object from TPR.fit
, no pause is enabled.
Value
No return value.
See Also
Examples
data("bat")
x <- bat$x
y <- bat$y
fit <- TRR.fit(x, y, method="standard")
plot(fit)
## Change the significant level to 0.1
plot(fit, level = 0.1)