Step2Selection {traj}R Documentation

Select a Subset of the Measures Using Factor Analysis

Description

This function applies the following dimension reduction algorithm to the measures computed by Step1Measures:

  1. Drop the measures whose values are constant across the trajectories;

  2. Use principal component analysis (PCA) on the measures to form factors summarizing the variability in the measures;

  3. Drop the factors whose variance is smaller than any one of the standardized measures;

  4. Perform a varimax rotation on the remaining factors;

  5. For each rotated factor, select the measure that has the highest correlation (aka factor loading) with it and that hasn't yet been selected;

  6. Drop the remaining measures.

Usage

Step2Selection(trajMeasures, num.select = NULL, discard = NULL, select = NULL)

## S3 method for class 'trajSelection'
print(x, ...)

## S3 method for class 'trajSelection'
summary(object, ...)

Arguments

trajMeasures

object of class trajMeasures as returned by Step1Measures.

num.select

an optional positive integer indicating the number of factors to keep in the second stage of the algorithm. Defaults to NULL so that all factors with variance greater than any one of the normalized measures are selected.

discard

an optional vector of positive integers corresponding to the measures to be dropped from the analysis. See Step1Measures for the list of measures. Defaults to NULL.

select

an optional vector of positive integers corresponding to the measures to forcefully select. Defaults to NULL. If a vector is supplied, the five-steps selection algorithm described above is bypassed and the corresponding measures are selected instead.

x

object of class trajSelection.

...

further arguments passed to or from other methods.

object

object of class trajSelection.

Value

An object of class trajSelection; a list containing the values of the selected measures, the output of the principal component analysis as well as a curated form of the arguments.

References

Leffondre K, Abrahamowicz M, Regeasse A, Hawker GA, Badley EM, McCusker J, Belzile E. Statistical measures were proposed for identifying longitudinal patterns of change in quantitative health indicators. J Clin Epidemiol. 2004 Oct;57(10):1049-62. doi: 10.1016/j.jclinepi.2004.02.012. PMID: 15528056.

See Also

principal Step1Measures

Examples

## Not run: 
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column

m = Step1Measures(trajdata.noGrp, measure = c(1:18), ID = TRUE)
s = Step2Selection(m)

print(s)

s2 = Step2Selection(m, select = c(3, 13, 11, 15))

## End(Not run)



[Package traj version 2.1.0 Index]