Description Usage Arguments Details Examples
The function selects triangulation for estimating mean function based on leave-image-out cross-validation.
1 | cv.image(Y, Z, d.est = 5, r = 1, V.ests, Tr.ests, lambda, nfold = 10)
|
Y |
a matrix of imaging data, each row corresponding to one subject/image. |
Z |
a 2-column matrix specifying locations of each pixel/voxel. |
d.est |
degree of bivariate spline, default is 5. |
r |
smoothness parameter. Default is 1. |
V.ests |
lists of matrices containing vertices' information of triangulation candidates. |
Tr.ests |
list of 3-column matrices specifying triangles in the triangulation candidates. |
lambda |
the vector of the candidates of penalty parameter. |
nfold |
number of folds in k-fold cross-validation. Default is 10. |
This R package is the implementation program for manuscript entitled "Simultaneous Confidence Corridors for Mean Functions in Functional Data Analysis of Imaging Data" by Yueying Wang, Guannan Wang, Li Wang and R. Todd Ogden.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Triangulation information;
data(Brain.V1); data(Brain.Tr1); # triangulation No. 1;
data(Brain.V2); data(Brain.Tr2); # triangulation No. 2;
data(Brain.V3); data(Brain.Tr3); # triangulation No. 3;
V.ests=list(V1=Brain.V1,V2=Brain.V2,V3=Brain.V3);
Tr.ests=list(Tr1=Brain.Tr1,Tr2=Brain.Tr2,Tr3=Brain.Tr3);
# Location information;
n1=40; n2=40;
npix=n1*n2
u1=seq(0,1,length.out=n1)
v1=seq(0,1,length.out=n2)
uu=rep(u1,each=n2)
vv=rep(v1,times=n1)
Z=as.matrix(cbind(uu,vv))
ind.inside=inVT(Brain.V1,Brain.Tr1,Z[,1],Z[,2])$ind.inside
# Parameters for bivariate spline over triangulation;
d.est=5; r=1;
# simulation parameters
n=50; lam1=0.5; lam2=0.2; mu.func=2; noise.type='Func';
lambda=10^{seq(-6,3,0.5)}
dat=data1g.image(n,Z,ind.inside,mu.func,noise.type,lam1,lam2)
Y=dat$Y
tri.est=cv.image(Y,Z,d.est,r,V.ests,Tr.ests,lambda)
tri.est$tri.select; V.est=tri.est$V.est; Tr.est=tri.est$Tr.est;
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.