estimateIGTTrajectory {EHRtemporalVariability}R Documentation

Estimates a trajectory of the information temporal evolution in a IGT projection by fitting a cubic smoothing spline

Description

Estimates a DataTemporalMap from a data.frame containing individuals in rows and the variables in columns, being one of these columns the analysis date (typically the acquisition date). Will return a DataTemporalMap object or a list of DataTemporalMap objects depending on the number of analysis variables.

Usage

estimateIGTTrajectory(igtProjection, nPoints = NULL)

Arguments

igtProjection

of class IGTProjection.

nPoints

the number of points to fit within the IGT projection range. By default 10x the number of time batches, what shows a high resolution trajectory.

Value

A list containing a data.frame of the estimated trajectory points, the estimated date for each point, and the fitted trajectory function as smooth.spline objects.

Examples

load(system.file("extdata",
                 "variabilityDemoNHDSdiagcode1-phewascode.RData",
                  package="EHRtemporalVariability"))

igtTrajectory <- estimateIGTTrajectory( igtProjection   =  igtProjs[[1]] )
igtTrajectory$points


[Package EHRtemporalVariability version 1.2.1 Index]