Plot method for IWT results on functional on scalar linear model
plot.IWTlm.Rdplot method for class "IWTlm". Plotting function creating a
graphical output of the IWT for the test on a functional on scalar linear
model: functional data, and IWT-adjusted p-values of the F-tests on the whole
model and of t-tests on all covariates' effects.
Usage
# S3 method for class 'IWTlm'
plot(
x,
xrange = c(0, 1),
alpha1 = 0.05,
alpha2 = 0.01,
plot_adjpval = FALSE,
col = c(1, grDevices::rainbow(dim(x$adjusted_pval_part)[1])),
ylim = NULL,
ylab = "Functional Data",
main = NULL,
lwd = 1,
type = "l",
...
)
# S3 method for class 'TWTlm'
plot(
x,
xrange = c(0, 1),
alpha1 = 0.05,
alpha2 = 0.01,
plot_adjpval = FALSE,
col = c(1, grDevices::rainbow(dim(x$adjusted_pval_part)[1])),
ylim = NULL,
ylab = "Functional Data",
main = NULL,
lwd = 1,
type = "l",
...
)Arguments
- x
The object to be plotted. An object of class "
IWTlm", usually, a result of a call toIWTlm.- xrange
Range of the
xaxis.- alpha1
First level of significance used to select and display significant effects. Default is
alpha1 = 0.05.- alpha2
Second level of significance used to select and display significant effects. Default is
alpha1 = 0.01.alpha1andalpha2are s.t.alpha2 < alpha1. Otherwise the two values are switched.- plot_adjpval
A logical indicating wether the plots of adjusted p-values have to be done. Default is
plot_adjpval = FALSE.- col
Colors for the plot of functional data. Default is
col = 1.- ylim
Range of the
yaxis. Default isNULL, giving a plot with authomatic range for functional data.- ylab
Label of
yaxis of the plot of functional data. Default is "Functional Data".- main
An overall title for the plots (it will be pasted to "Functional Data and F-test" for the first plot and to covariates names for the other plots).
- lwd
Line width for the plot of the adjusted p-value function. Default is
lwd=1.- type
line type for the plot of the adjusted p-value function. Default is type='l'.
- ...
Additional plotting arguments that can be used with function
plot, such asgraphical parameters(seepar).
Value
No value returned. The function produces a graphical output of the
IWT results: the plot of the functional data and the one of the adjusted
p-values. The portions of the domain selected as significant by the test at
level alpha1 and alpha2 are highlighted in the plot of the
adjusted p-value function and in the one of functional data by gray areas
(light and dark gray, respectively). The first plot reports the gray areas
corresponding to a significant F-test on the whole model. The remaining
plots report the gray areas corresponding to significant t-tests on each
covariate's effect.
References
Pini, A., & Vantini, S. (2017). Interval-wise testing for functional data. Journal of Nonparametric Statistics, 29(2), 407-424.
Pini, A., Vantini, S., Colosimo, B. M., & Grasso, M. (2018). Domain‐selective functional analysis of variance for supervised statistical profile monitoring of signal data. Journal of the Royal Statistical Society: Series C (Applied Statistics) 67(1), 55-81.
Abramowicz, K., Hager, C. K., Pini, A., Schelin, L., Sjostedt de Luna, S., & Vantini, S. (2018). Nonparametric inference for functional‐on‐scalar linear models applied to knee kinematic hop data after injury of the anterior cruciate ligament. Scandinavian Journal of Statistics 45(4), 1036-1061.
See also
IWTimage for the plot of p-values heatmaps. See also
IWT1, IWT2 to perform the ITP to test on the
mean of one population and test of differences between two populations. See
ITPlmbspline for functional on scalar linear model based on
B-spline basis representation.
Examples
# Importing the NASA temperatures data set
data(NASAtemp)
temperature <- rbind(NASAtemp$milan, NASAtemp$paris)
groups <- c(rep(0, 22), rep(1, 22))
# Performing the IWT
IWT.result <- IWTlm(temperature ~ groups, B = 2L)
#> Error in eval(predvars, data, env): object 'groups' not found
# Summary of the IWT results
summary(IWT.result)
#> Error: object 'IWT.result' not found
# Plot of the IWT results
layout(1)
plot(IWT.result)
#> Error: object 'IWT.result' not found
# All graphics on the same device
layout(matrix(1:4, nrow = 2, byrow = FALSE))
plot(
IWT.result,
main = 'NASA data',
plot_adjpval = TRUE,
xlab = 'Day',
xrange = c(1, 365)
)
#> Error: object 'IWT.result' not found