plot_library_size: Plot the size of the library for a given 'T' as a function of...

plot_library_sizeR Documentation

Plot the size of the library for a given 'T' as a function of 'E' and 'tstar'

Description

Show a coloured contour plot of how the library size changes for a univariate time series with sample size 'T' as chosen embedding dimension 'E' and target index 'tstar' vary.

Usage

plot_library_size(
  T = 50,
  E_vec = 2:10,
  tstar_vec = 1:50,
  annotate = TRUE,
  annotate_cex = 1,
  annotate_tstar = 23,
  annotate_extra_cex = 0.7,
  words_pos = c(6, 3.5, 6, 49.6),
  words_cex = 0.9,
  mgp_vals = c(2, 0.5, 0)
)

Arguments

T

integer of the sample size of a univariate time series (time series itself not needed)

E_vec

vector of integers to show for the embedding dimension

tstar_vec

vector of integers to show for the focal point time index 'tstar', 't*' in the manuscript, from which projections are made from

annotate

logical whether to add numbers along the middle of the plot (avoids the need for a colorbar, which was fiddly to do, see attempts deleted in 8f567ff, while also having a grey background), and add text to explain the grey areas.

annotate_cex

text size for main annotation

annotate_tstar

tstar value at which to add the annotated numbers; if NULL then is 'max(tstar_vec)/2'.

annotate_extra_cex

text size for extra smaller numbers in boxes at the top

words_pos

vector of positioning for words in grey areas, given by 'E' and ‘tstar' position for 'Early values’ text (text is placed to the right of these), then for ‘Late values’ text (text is centred around these.

words_cex

text size for above words

mgp_vals

mgp values to use, as in 'plot(..., mgp = mgp_vals)'.

Value

plots the contour plot and returns the matrix ('C' in manuscript) of calculated library sizes

Author(s)

Andrew Edwards

Examples

## Not run: 
# For manusript doing:
postscript("library_size.eps",
            height = 6,
            width = 6,
            horizontal=FALSE,
            paper="special")
plot_library_size()
dev.off()

## End(Not run)

luke-a-rogers/pbsedm documentation built on June 3, 2024, 5:20 a.m.