Learn R Programming

EHRtemporalVariability (version 1.2.1)

estimateIGTTrajectory: 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)

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.

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.

Examples

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

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

Run the code above in your browser using DataLab