fda.smoothdata: Functional Actigraphy Data Smoothing

Description Usage Arguments Details Value Author(s) Examples

View source: R/fda.smoothdata.R

Description

This function produces functional actigraphy data from matrix actigraphy data.

Usage

1
fda.smoothdata(data, basistype="fourier", nbasis=9, norder=4)

Arguments

data

A list consisting of the following two components:
data$mat A matrix where rows represent the time, columns are the samples, and the column names are the subjects.
data$cov A two column matrix that contains the actigraphy data and clinical covariate.

basistype

A string specifying either "Fourier" and "bspline".

nbasis

The number of basis functions to be used for functional data. Default value is 9.

norder

The order of the bspline basis functions. Default value is 4.

Details

Note: The output of function fda.matchid can be directly used as the input for this argument.
If the data is a categorical covariate

Value

A list consisting of two components as follows:

fd

A fdSmooth data object containing the functional data (see function smooth.basis in the package fda for details).

cov

An object that is the same as the argument data$cov.

Author(s)

William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	data(act_29pt)
	data(clinic_29pt_ahi)
	
	data <- act_29pt
	ahi <- clinic_29pt_ahi
	
	matchid  <- fda.matchid(data, ahi, "contin")
	FDcont <- fda.smoothdata(matchid)
	
	### Smooth the Results
	ts.plot(predict(FDcont$fd$fd, 1:1440), main="Smoothed Activity Data")

Actigraphy documentation built on March 26, 2020, 6:07 p.m.