sim_model_ex1 {ehymet} | R Documentation |
Function for generating functional data in one dimension
Description
Each dataset has 2 groups with n
curves each, defined in the interval
t=[0,1]
with p
equidistant points. The first n
curves are
generated fron the following model
X1(t)=E1(t)+e(t)
where E1(t)=E1(X(t))=30t23(1−t)
is the mean function and e(t)
is a centered Gaussian process with
covariance matrix Cov(e(ti),e(tj))=0.3exp(−0.3∣ti−tj∣)
The remaining 50 functions are generated from model i_sim
with
i_sim
∈{1,…,8}.
The first three models contain changes in the mean, while the covariance
matrix does not change. Model 4 and 5 are obtained by multiplying the
covariance matrix by a constant. Model 6 is obtained from adding to
E1(t)
a centered Gaussian process h(t)
whose covariance matrix
is given by Cov(e(ti),e(tj))=0.5exp(−0.2∣ti−tj∣)
.
Model 7 and 8 are obtained by a different mean function.
- Model 1.
X1(t)=30t23(1−t)+0.5+e(t).
- Model 2.
X2(t)=30t23(1−t)+0.75+e(t).
- Model 3.
X3(t)=30t23(1−t)+1+e(t).
- Model 4.
X4(t)=30t23(1−t)+2e(t).
- Model 5.
X5(t)=30t23(1−t)+0.25e(t).
- Model 6.
X6(t)=30t23(1−t)+h(t).
- Model 7.
X7(t)=30t(1−t)2+h(t).
- Model 8.
X8(t)=30t(1−t)2+e(t).
Usage
sim_model_ex1(n = 50, p = 30, i_sim = 1)
Arguments
n |
Number of curves to generate for each of the two groups.
Set to 50 by default.
|
p |
Number of grid points of the curves.
Curves are generated over the interval [0,1] .
Set to 30 grid point by default.
|
i_sim |
Integer set to 1,…,8 .
|
Value
data matrix of size 2n×p
.
Examples
sm1 <- sim_model_ex1()
dim(sm1)
[Package
ehymet version 0.1.0
Index]