# plot.PTAk: Plot a PTAk object In PTAk: Principal Tensor Analysis on k Modes

 plot.PTAk R Documentation

## Plot a PTAk object

### Description

Screeplot of singular values or superposed plot of modes for one or two components (1 dimensional scatterplot with spread labels or scatterplot on two dimensions).

### Usage

``````## S3 method for class 'PTAk'
plot(x, labels = TRUE, mod = 1, nb1 = 1, nb2 = NULL,
coefi = list(NULL, NULL), xylab = TRUE, ppch = (1:length(solution)),
lengthlabels = 2, scree = FALSE, ordered = TRUE,
nbvs = 40, RiskJack = NULL, method = "",ZoomInOut=NULL, Zlabels=NULL, Zcol=NULL,
poslab=c(2,1,3,3), signedCTR = FALSE, relCTR = TRUE,...)
RiskJackplot(x, nbvs = 1:20, mod = NULL, max = NULL, rescaled=TRUE, ...)
``````

### Arguments

 `x` an object inheriting from class `PTAk`, representing a generalised singular value decomposition `labels` logical if `TRUE` plots the labels given in `solution[[mod]]["n"]` `mod` vectors of the modes numbers to be plotted `nb1` number identifying the Principal Tensor to display on the vertical axe, can be checked using `summary.PTAk` `nb2` as nb1 to be displayed on the horizontal axe, if `NULL` the horizontal axe will be used as `Index` (see `plot.default`) `coefi` coefficients to multiply components for all modes (not just the one in `mod`) for rescaling or changing signs purposes; each element of the list correspond to `nb1` and `nb2` and are vectors of dimentions the tensor order `xylab` logical to display axes labels `ppch` a vector of length at least `length(mod)` used for `pch=` `lengthlabels` a number or a vector of numbers of characters in labels to be used for display `scree` logical to display a screeplot of squared singular values as percent of total variation `ordered` logical used when displaying the screeplot with sorted values (TRUE) or the order is given by output listing from `summary.PTAk` `nbvs` a maximum number of singular values to display on the screeplot or a vector of ranks `max` is the number of singular values to be considered as giving the perfect fit, NULL is the max possible in x `rescaled` boolean to rescale the y axis to 0-100 `RiskJack` if not `NULL` is an integer, scree is `TRUE` and ordered is `TRUE`, plots on top of the scree plot a Risk plot with `nbvs = 1:RiskJack`. It is possible to use directly the function `RiskJackplot`: the default maximum dimension (argument `max`) is `length(solution[[k]][["d"]])`. `method` default is `""`, a value `"FCA"` is to be used only if `solution` is after an FCA with `SVDgen` `ZoomInOut` list used as [] for xlim and [] for ylim in xy-plots instead of max and min range `Zlabels` used as labels instead of `x[[mod]]\$n`, it is a list with the same length as all modes. For example on 3 modes changing the labels of the second mode only will have to set `Zlabels=list(NULL,rep("a",length(x[]\$n) ), NULL )` `Zcol` list of vectors of colours for Zlabels `poslab` integer or vector for 'pos' parameter, position of labels `signedCTR` logical to plot signed-CTR instead of coordinates, see `CTR` `relCTR` logical if `signedCTR = TRUE` use relative CTRs, expected contribution `1` if uniform or equal contributions. `...` plot arguments can be passed (except `xlim, ylim, ylab,pch,xaxt` for component plot, and `xlab, ylab` for screeplot). For example to have normed plot one can use `asp=1`

### Details

Plot components of one or two Principal Tensors, modes are superposed if more than one is asked, or gives a screeplot. As it is using `plot.default` at some point some added features can be used in the ... part, especially `xlab= ` may be useful when `nb2=NULL`. Plots are superposed as they correspond to the same Principal Tensor and so this gives insight to interpretation of it, but careful is recommended as only overall interpretation, once the Principal Tensor has been rebuilt mentally (i.e. product of signs ...) to work out oppositions or associations. The risk plot on top of a screeplot is an approximation of the Jacknife estimate of the MSE in the choice of number of dimensions (see Besse et al.(1997)).

### Note

This function is used all for `FCAk`, and `CANDPARA`, `PCAn` objjects notheless for this last object other interesting plots known as jointplots have not been implemented.

### Author(s)

Didier G. Leibovici

### References

Besse, P Cardot, H and Ferraty, F (1997) Simultaneous non-parametric regressions of unbalanced longitudinal data. Computational Statistics and Data Analysis, 24:255-270.

Leibovici D (2000) Multiway Multidimensional Analysis for Pharmaco-EEG Studies. https://www.researchgate.net/publication/216807619_Multiway_Multidimensional_Analysis_for_Pharmaco-EEG_Studies

`PTAk`, `PTA3`, `CTR`, `FCAk`,`SVDgen`

### Examples

``````#  see the demo function   source(paste(R.home(),"/ library/PTAk/demo/PTA3.R",sep=""));
# or    source(paste(R.home(),"/ library/PTAk/demo/PTAk.R",sep=""));

# demo.PTA3()
``````

PTAk documentation built on March 31, 2023, 5:17 p.m.