data.coor: Generate irregular data

View source: R/misc-functions.R

data.coorR Documentation

Generate irregular data

Description

Generate sparse irregular longitudinal samples.

Usage

data.coor(n, mu.c = 10, nb.n = 10, nb.p = 0.25)

Arguments

n

the number of samples

mu.c

the mean

nb.n

the maximum number of observations per curve

nb.p

the probability of success when computing the number of observations per curve

mu.f

the mean function

phi

a list of length 2 containing two "eigenfunctions"

Details

Generate sparse irregular longitudinal samples. The number of observations per curve is rbinom(nb.n, nb.p). It uses a Karhunen-Loeve representations uing the mean function mu.f and (2) eigenfunctions (in phi). The scores are rnorm(0, 25) and rnorm(0, 1).

Value

A list with two components:

x

A list with the n vectors of observations (one per curve)

pp

A corresponding list with the vectors of times at which observations were taken


msalibian/sparseFPCA documentation built on Nov. 26, 2022, 4:47 a.m.