Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CreateStringingPlot

Create plots for observed and stringed high dimensional data


Description

The function produces the following three plots: 1) A plot of predictors (standardized if specified so during stringing) in original order for a subset of observations; 2) A plot of predictors in stringed order for the same subset of observations; 3) A plot of the stringing function, which is the stringed order vs. the original order.

Usage

CreateStringingPlot(stringingObj, subset, ...)

Arguments

stringingObj

A stringing object of class "Stringing", returned by the function Stringing.

subset

A vector of indices or a logical vector for subsetting the observations. If missing, first min(n,50) observations will be plotted where n is the sample size.

...

Other arguments passed into matplot for plotting options

Details

This approach is based on Chen, K., Chen, K., Müller, H.G., Wang, J.L. (2011). Stringing high-dimensional data for functional analysis. J. American Statistical Association 106, 275–284.

Examples

set.seed(1)
n <- 50
wiener = Wiener(n = n)[,-1]
p = ncol(wiener)
rdmorder = sample(size = p, x=1:p, replace = FALSE)
stringingfit = Stringing(X = wiener[,rdmorder], disOptns = "correlation")
diff_norev = sum(abs(rdmorder[stringingfit$StringingOrder] - 1:p))
diff_rev = sum(abs(rdmorder[stringingfit$StringingOrder] - p:1))
if(diff_rev <= diff_norev){
  stringingfit$StringingOrder = rev(stringingfit$StringingOrder)
  stringingfit$Ly = lapply(stringingfit$Ly, rev)
}
CreateStringingPlot(stringingfit, 1:20)

fdapace

Functional Data Analysis and Empirical Dynamics

v0.5.6
BSD_3_clause + file LICENSE
Authors
Cody Carroll [aut, cre] (<https://orcid.org/0000-0003-3525-8653>), Alvaro Gajardo [aut], Yaqing Chen [aut], Xiongtao Dai [aut], Jianing Fan [aut], Pantelis Z. Hadjipantelis [aut], Kyunghee Han [aut], Hao Ji [aut], Shu-Chin Lin [ctb], Paromita Dubey [ctb], Hans-Georg Mueller [cph, ths, aut], Jane-Ling Wang [cph, ths, aut]
Initial release
2021-01-10,

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.