fEqMoments.test | R Documentation |
Two tests for the equality of means and covariances of two populations are provided. Both tests are constructed under gaussianity following Horvath & Kokoszka, 2012, Chapter 5.
fmean.test.fdata( X.fdata, Y.fdata, method = c("X2", "Boot"), npc = 5, alpha = 0.95, B = 1000, draw = FALSE ) cov.test.fdata( X.fdata, Y.fdata, method = c("X2", "Boot"), npc = 5, alpha = 0.95, B = 1000, draw = FALSE )
X.fdata |
|
Y.fdata |
|
method |
c("X2","Boot"). "X2" includes the asymptotic distribution. "Boot" computes the bootstrap approximation. |
npc |
The number of principal components employed. If |
alpha |
Confidence level. By default =0.95. |
B |
Number of bootstrap replicas when method="Boot". |
draw |
By default, FALSE. Plots the density of the bootstrap replicas jointly with the statistic. |
fmean.test.fdata
computes the test for equality of means.
cov.test.fdata
computes the test for equality of covariance operators.
Both tests have asymptotic distributions under the null related with chi-square distribution. Also, a
parametric bootstrap procedure is implemented in both cases.
Return a list with:
stat Value of the statistic.
pvalue P-values for the test.
vcrit Critical cutoff for rejecting the null hypothesis.
p Degrees of freedom for X2 statistic.
B Number of bootstrap replicas.
Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.febrero@usc.es
Inference for Functional Data with Applications. Horvath, L and Kokoszka, P. (2012). Springer.
See Also as fanova.RPm, fanova.onefactor
.
## Not run: tt=seq(0,1,len=51) bet=0 mu1=fdata(10*tt*(1-tt)^(1+bet),tt) mu2=fdata(10*tt^(1+bet)*(1-tt),tt) fsig=1 X=rproc2fdata(100,tt,mu1,sigma="vexponential",par.list=list(scale=0.2,theta=0.35)) Y=rproc2fdata(100,tt,mu2,sigma="vexponential",par.list=list(scale=0.2*fsig,theta=0.35)) fmean.test.fdata(X,Y,npc=-.98,draw=TRUE) cov.test.fdata(X,Y,npc=5,draw=TRUE) bet=0.1 mu1=fdata(10*tt*(1-tt)^(1+bet),tt) mu2=fdata(10*tt^(1+bet)*(1-tt),tt) fsig=1.5 X=rproc2fdata(100,tt,mu1,sigma="vexponential",par.list=list(scale=0.2,theta=0.35)) Y=rproc2fdata(100,tt,mu2,sigma="vexponential",par.list=list(scale=0.2*fsig,theta=0.35)) fmean.test.fdata(X,Y,npc=-.98,draw=TRUE) cov.test.fdata(X,Y,npc=5,draw=TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.