Skip to contents

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 \(X_1(t)=E_1(t)+e(t)\) where \(E_1(t)=E_1(X(t))=30t^{ \frac{3}{2}}(1-t)\) is the mean function and \(e(t)\) is a centered Gaussian process with covariance matrix \(Cov(e(t_i),e(t_j))=0.3 \exp(-\frac{\lvert t_i-t_j \rvert}{0.3})\) The remaining 50 functions are generated from model i_sim with i_sim \(\in \{1, \ldots, 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 \(E_1(t)\) a centered Gaussian process \(h(t)\) whose covariance matrix is given by \(Cov(e(t_i),e(t_j))=0.5 \exp (-\frac{\lvert t_i-t_j\rvert}{0.2})\). Model 7 and 8 are obtained by a different mean function.

Model 1.

\(X_1(t)=30t^{\frac{3}{2}}(1-t)+0.5+e(t).\)

Model 2.

\(X_2(t)=30t^{\frac{3}{2}}(1-t)+0.75+e(t).\)

Model 3.

\(X_3(t)=30t^{\frac{3}{2}}(1-t)+1+e(t).\)

Model 4.

\(X_4(t)=30t^{\frac{3}{2}}(1-t)+2 e(t).\)

Model 5.

\(X_5(t)=30t^{\frac{3}{2}}(1-t)+0.25 e(t).\)

Model 6.

\(X_6(t)=30t^{\frac{3}{2}}(1-t)+ h(t).\)

Model 7.

\(X_7(t)=30t{(1-t)}^2+ h(t).\)

Model 8.

\(X_8(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, \ldots, 8\).

Value

data matrix of size \(2n \times p\).

Examples

sm1 <- sim_model_ex1()
dim(sm1)
#> [1] 100  30