Interval-wise testing procedure for testing functional-on-scalar linear models
IWTlm.RdThe function is used to fit and test functional linear models. It can be used to carry out regression, and analysis of variance. It implements the interval-wise testing procedure (IWT) for testing the significance of the effects of scalar covariates on a functional population.
Arguments
- formula
An object of class "
formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. Example: y ~ A + B where: y is a matrix of dimension n * p containing the point-wise evaluations of the n functional data on p points or an object of classfd(seefdapackage) containing the functional data set A, B are n-dimensional vectors containing the values of two covariates. Covariates may be either scalar or factors.- B
The number of iterations of the MC algorithm to evaluate the p-values of the permutation tests. The defualt is
B=1000.- method
Permutation method used to calculate the p-value of permutation tests. Choose "
residuals" for the permutations of residuals under the reduced model, according to the Freedman and Lane scheme, and "responses" for the permutation of the responses, according to the Manly scheme.- dx
step size for the point-wise evaluations of functional data. dx is only used ia an object of class 'fd' is provided as response in the formula.
- recycle
flag specifying whether the recycled version of IWT has to be used.
Value
IWTlm returns an object of class "IWTlm".
The function summary is used to obtain and print a summary of the
results. An object of class "ITPlm" is a list containing at least
the following components:
call: Call of the function.design_matrix: Design matrix of the linear model.unadjusted_pval_F: Unadjusted p-value function of the F test.pval_matrix_F: Matrix of dimensionsc(p,p)of the p-values of the interval-wise F-tests. The element \((i,j)\) of matrixpval_matrix_Fcontains the p-value of the test on interval \((j,j+1,...,j+(p-i))\).adjusted_pval_F: Adjusted p-value function of the F test.unadjusted_pval_part: Unadjusted p-value functions of the functional t-tests on each covariate, separately (rows) on each domain point (columns).pval_matrix_part: Array of dimensionsc(L+1,p,p)of the p-values of the interval-wise t-tests on covariates. The element \((l,i,j)\) of arraypval_matrix_partcontains the p-value of the test of covariatelon interval \((j,j+1,...,j+(p-i))\).adjusted_pval_part: Adjusted p-values of the functional t-tests on each covariate (rows) on each domain point (columns).data.eval: Evaluation of functional data.coeff.regr.eval: Evaluation of the regression coefficients.fitted.eval: Evaluation of the fitted values.residuals.eval: Evaluation of the residuals.R2.eval: Evaluation of the functional R-suared.
References
A. Pini and S. Vantini (2017). The Interval Testing Procedure: Inference for Functional Data Controlling the Family Wise Error Rate on Intervals. Biometrics 73(3): 835–845.
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.
D. Freedman and D. Lane (1983). A Nonstochastic Interpretation of Reported Significance Levels. Journal of Business & Economic Statistics 1(4), 292-298.
B. F. J. Manly (2006). Randomization, Bootstrap and Monte Carlo Methods in Biology. Vol. 70. CRC Press.
See also
See summary.IWTlm for summaries and
plot.IWTlm for plotting the results. See
ITPlmbspline for a functional linear model test based on an
a-priori selected B-spline basis expansion. See also IWTaov
to fit and test a functional analysis of variance applying the IWT, and
IWT1, IWT2 for one-population and
two-population tests.
Examples
# Defining the covariates
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
graphics::layout(1)
plot(
IWT.result,
main = 'NASA data',
plot_adjpval = TRUE,
xlab = 'Day',
xrange = c(1, 365)
)
#> Error: object 'IWT.result' not found
# All graphics on the same device
graphics::layout(matrix(1:6, nrow = 3, byrow = FALSE))
plot(
IWT.result,
main = 'NASA data',
plot_adjpval = TRUE,
xlab = 'Day',
xrange = c(1, 365)
)
#> Error: object 'IWT.result' not found