boot.image: Triangulation selection for contructing the SCC via bootstrap

Description Usage Arguments Details Examples

View source: R/boot.image.R

Description

The function selects triangulation used for constructing SCC by bootstrap method.

Usage

1
2
3
boot.image(Ya, Yb = NULL, Z, d.est, d.band, r, V.est.a, Tr.est.a,
  V.est.b = NULL, Tr.est.b = NULL, V.bands, Tr.bands, lambda,
  nboot = 50, alpha0 = 0.05, adjust.sigma = TRUE)

Arguments

Ya

a matrix of data with each row corresponding to one subject/image.

Yb

an optional matrix containing the second group of imaging data. When Yb is NULL, triangulation selection focuses on one sample SCC, otherwise it focuses on the SCC for mean difference (μ_2-μ_1) between two sets of images.

Z

a 2-column matrix specifying locations of information.

d.est

degree of bivariate spline for mean estimation.

d.band

degree of bivariate spline for SCC.

r

smoothness parameter.

V.est.a

the 2-column matrix of vertices' coordinates in the triangulation for estimating mean in the first sample.

Tr.est.a

the 3-column matrix specifying triangles in the triangulation. Each row contains 3 indices of vertices corresponding to one triangle in the triangulation.

V.est.b, Tr.est.b

optional information of triangulation used for estimating mean in the second sample.

V.bands, Tr.bands

lists of candidates for triangulations used to construct SCC.

lambda

the vector of the candidates for penalty parameter when estimating mean function.

nboot

number of bootstrap iterations. Default is 50.

alpha0

a value specifying confidence level of SCC.

adjust.sigma

a logical value indicating whether σ(z) is adjusted when constructing SCC. Default is TRUE.

Details

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.

Examples

 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
41
42
# 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.est=Brain.V2; Tr.est=Brain.Tr2;
V.bands=list(V1=Brain.V1,V2=Brain.V2,V3=Brain.V3);
Tr.bands=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(V.est,Tr.est,Z[,1],Z[,2])$ind.inside
# Parameters for bivariate spline over triangulation;
d.est=5; d.band=2; r=1;

# Example 1. One-group SCC;
# simulation parameters
n=50; lam1=0.5; lam2=0.2; mu.func=2; noise.type='Func';
lambda=10^{seq(-6,3,0.5)}; alpha.grid=c(0.1,0.05,0.01);
dat=data1g.image(n,Z,ind.inside,mu.func,noise.type,lam1,lam2)
Y=dat$Y; beta.true=dat$beta.true;
tri.band=boot.image(Ya=Y,Z=Z,d.est=d.est,d.band=d.band,r=r,V.est.a=V.est,Tr.est.a=Tr.est,V.bands=V.bands,Tr.bands=Tr.bands,lambda=lambda)
tri.band$tri.band
V.band=tri.band$V.band.a; Tr.band=tri.band$Tr.band.a;

# Example 2. Two-group SCC;
# simulation parameters
na=50; nb=60; lam1=0.5; lam2=0.2; mu1.func=1; delta=0.3;
noise.type='Func'; lambda=10^{seq(-6,3,0.5)}; alpha.grid=c(0.10,0.05,0.01);
dat=data2g.image(na,nb,Z,ind.inside,mu1.func,noise.type,lam1,lam2,delta)
Ya=dat$Ya; Yb=dat$Yb; beta.true=dat$beta.true;
beta.diff=beta.true[,2]-beta.true[,1]
V.est.a=V.est.b=V.est;
Tr.est.a=Tr.est.b=Tr.est;
tri.band=boot.image(Ya=Ya,Yb=Yb,Z=Z,d.est=d.est,d.band=d.band,r=r,V.est.a=V.est.a,Tr.est.a=Tr.est.a,V.est.b=V.est.b,Tr.est.b=Tr.est.b,V.bands=V.bands,Tr.bands=Tr.bands,lambda=lambda)
tri.band$tri.band
V.band.a=tri.band$V.band.a; Tr.band.a=tri.band$Tr.band.a;
V.band.b=tri.band$V.band.b; Tr.band.b=tri.band$Tr.band.b;

funstatpackages/ImageSCC documentation built on March 3, 2020, 12:25 a.m.