Description Usage Arguments Value Author(s) References See Also Examples
fosr.perm()
is a wrapper function calling fosr.perm.fit()
,
which fits models to permuted data, followed by fosr.perm.test()
,
which performs the actual simultaneous hypothesis test. Calling the latter
two functions separately may be useful for performing tests at different
significance levels. By default, fosr.perm()
produces a plot using
the plot function for class fosr.perm
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40  fosr.perm(
Y = NULL,
fdobj = NULL,
X,
con = NULL,
X0 = NULL,
con0 = NULL,
argvals = NULL,
lambda = NULL,
lambda0 = NULL,
multi.sp = FALSE,
nperm,
level = 0.05,
plot = TRUE,
xlabel = "",
title = NULL,
prelim = if (multi.sp) 0 else 15,
...
)
fosr.perm.fit(
Y = NULL,
fdobj = NULL,
X,
con = NULL,
X0 = NULL,
con0 = NULL,
argvals = NULL,
lambda = NULL,
lambda0 = NULL,
multi.sp = FALSE,
nperm,
prelim,
...
)
fosr.perm.test(x, level = 0.05)
## S3 method for class 'fosr.perm'
plot(x, level = 0.05, xlabel = "", title = NULL, ...)

Y, fdobj 
the functional responses, given as either an n\times d
matrix 
X 
the design matrix, whose columns represent scalar predictors. 
con 
a row vector or matrix of linear contrasts of the coefficient functions, to be restricted to equal zero. 
X0 
design matrix for the nullhypothesis model. If 
con0 
linear constraints for the nullhypothesis model. 
argvals 
the d argument values at which the coefficient functions will be evaluated. 
lambda 
smoothing parameter value. If 
lambda0 
smoothing parameter for nullhypothesis model. 
multi.sp 
a logical value indicating whether separate smoothing
parameters should be estimated for each coefficient function. Currently
must be 
nperm 
number of permutations. 
level 
significance level for the simultaneous test. 
plot 
logical value indicating whether to plot the real and permuteddata pointwise Ftype statistics. 
xlabel 
xaxis label for plots. 
title 
title for plot. 
prelim 
number of preliminary permutations. The smoothing parameter
in the main permutations will be fixed to the median value from these
preliminary permutations. If 
... 
for 
x 
object of class 
fosr.perm
or fosr.perm.test
produces an object of
class fosr.perm
, which is a list with the elements below.
fosr.perm.fit
also outputs an object of this class, but without the
last five elements.
F 
pointwise Ftype statistics at each of the
points given by 
F.perm 
a matrix, each of whose rows gives the pointwise Ftype statistics for a permuted data set. 
argvals 
points at which Ftype statistics are computed. 
lambda.real 
smoothing parameter(s) for the realdata fit. 
lambda.prelim 
smoothing parameter(s) for preliminary permuteddata fits. 
lambda.perm 
smoothing parameter(s) for main permuteddata fits. 
lambda0.real, lambda0.prelim, lambda0.perm 
as above, but for null hypothesis models. 
level 
significance level of the test. 
critval 
critical value for the test. 
signif 
vector of
logical values indicating whether significance is attained at each of the
points 
n2s 
subset of 1, ...,

s2n 
points at which the test statistic changes from significant to nonsignificant. 
Philip Reiss phil.reiss@nyumc.org and Lan Huo
Reiss, P. T., Huang, L., and Mennes, M. (2010). Fast functiononscalar regression with penalized basis expansions. International Journal of Biostatistics, 6(1), article 28. Available at https://pubmed.ncbi.nlm.nih.gov/21969982/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  ## Not run:
# Test effect of region on mean temperature in the Canadian weather data
# The next two lines are taken from the fRegress.CV help file (package fda)
smallbasis < create.fourier.basis(c(0, 365), 25)
tempfd < smooth.basis(day.5,
CanadianWeather$dailyAv[,,"Temperature.C"], smallbasis)$fd
Xreg = cbind(1, model.matrix(~factor(CanadianWeather$region)1))
conreg = matrix(c(0,1,1,1,1), 1) # constrain region effects to sum to 0
# This is for illustration only; for a real test, must increase nperm
# (and probably prelim as well)
regionperm = fosr.perm(fdobj=tempfd, X=Xreg, con=conreg, method="OLS", nperm=10, prelim=3)
# Redo the plot, using axisIntervals() from the fda package
plot(regionperm, axes=FALSE, xlab="")
box()
axis(2)
axisIntervals(1)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.