Learn R Programming

Actigraphy (version 1.4.0)

flm_cate: Functional Linear Model Analysis

Description

A function that does functional linear model analysis.

Usage

flm_cate(FD, basistype="fourier", nbasis=9, norder=4)

Arguments

FD

The list from the function fda.smoothdata.

basistype

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

nbasis

The number of basis functions to be used for functional linear model analysis. Default value is 9.

norder

an integer specifying the order of b-splines, which is one higher than their degree. The default of 4 gives cubic splines.

Value

A list consisting of three components as follows:

freg

A fRegress fit object containing the intercept and coefficient functions (check function fRegress for details)

fregstd

A list containing the standard error functions of the intercept and coefficient functions.

Examples

Run this code
# NOT RUN {
	data(act_29pt)
	data(clinic_29pt_ahi)
	
	data <- act_29pt
	ahi <- clinic_29pt_ahi
	
	matchid  <- fda.matchid(data, ahi, "contin")
	FDcont <- fda.smoothdata(matchid)
	
	geftFDcont <- flm_cate(FDcont)
# }

Run the code above in your browser using DataLab