Step2Selection | R Documentation |
This function applies the following dimension reduction algorithm
to the measures computed by Step1Measures
:
Drop the measures whose values are constant across the trajectories;
Whenever two measures are highly correlated (absolute value of Pearson correlation > 0.98), keep the highest-ranking measure on the list (see Step1Measures
) and drop the other;
Use principal component analysis (PCA) on the measures to form factors summarizing the variability in the measures;
Drop the factors whose variance is smaller than any one of the standardized measures;
Perform a varimax rotation on the remaining factors;
For each rotated factor, select the measure that has the highest correlation (aka factor loading) with it and that hasn't yet been selected;
Drop the remaining measures.
Step2Selection(trajMeasures, num.select = NULL, discard = NULL, select = NULL)
## S3 method for class 'trajSelection'
print(x, ...)
## S3 method for class 'trajSelection'
summary(object, ...)
trajMeasures |
object of class |
num.select |
an optional positive integer indicating the number of
factors to keep in the second stage of the algorithm. Defaults to |
discard |
an optional vector of positive integers corresponding to the
measures to be dropped from the analysis. See
|
select |
an optional vector of positive integers corresponding to the
measures to forcefully select. Defaults to |
x |
object of class |
... |
further arguments passed to or from other methods. |
object |
object of class |
Whenever two measures are highly correlated (Pearson correlation >
0.98), the highest-ranking measure on the list (see Step1Measures
) is kept and the other is discarded and discards the others. PCA is applied on the remaining measures using the principal
function from the psych
package.
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.
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.
principal
Step1Measures
## 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(13, 3, 12, 9))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.