sim_corr | R Documentation |
Partially observed functional data is generated with 51 regular grids from the spatially correlated model
sim_corr(
n = 403,
type = c("partial", "snippet", "dense"),
out.prop = 0.2,
out.type = 1,
dist = "normal",
noise = 0,
dist.mat = dist.mat,
d = 1.4,
f = 0.2,
r.par = 200
)
n |
a number of curves |
type |
the type of generated data. "partial" means the option for partially observed data, "snippet" is short fragmented data, and "dense" means the fully observed curves. |
out.prop |
a proportion of outlying curves of total n curves. Only used for dist = "normal". |
out.type |
a outlier type, 1~3 are supported. Only used for dist = "normal". |
dist |
a distribution which the data is generated. "normal"(Normal distribution) and "tdist"(t-distribution) are supported. If dist = "tdist", the option of |
noise |
a numeric value which is added random gaussian noises. Default is 0(No random noise). |
dist.mat |
a 403 spatial locations and their distances matrix |
d |
a parameter for missingness when |
f |
a parameter for missingness when |
r.par |
a parameter that control the spatial correlation |
a list contatining as follows:
Ly |
a list of n vectors containing the observed values for each individual. |
Lt |
a list of n vectors containing the observation time points for each individual corresponding to |
out.ind |
a vector containing outlier index. 0 is non-outlier and 1 is the outlier. |
x.full |
a n x 51 dense matrix with n observations per 51 timepoints before making partially observed. |
Kraus, D. (2015). Components and completion of partially observed functional data. Journal of the Royal Statistical Society: Series B: Statistical Methodology, 777-801.
set.seed(100)
n <- 100
x.list <- sim_corr(n = n,
type = "partial",
out.prop = 0.2,
dist = "normal",
dist.mat = dist.mat[1:n, 1:n])
x <- list2matrix(x.list)
matplot(t(x), type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.