Learn R Programming

PTAk (version 1.2-6)

plot.PTAk: Plot a PTAk object

Description

Screeplot of singular values or plot of superposed modes or not for one or two components.

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, ...)
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 rescaling or changing signs purposes; each element of the list correpond 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 a integer, scree is TRUE and ordered is TRUE, plots on top of the scree plot a Risk plot with maximum dimension: min(RiskJack+length(nbvs),length(solution[[k]][["d"]])). It is possible t
method
default is "", a value "FCA" is to be used only if solution is after an FCA with SVDgen
ZoomInOut
used as xlim and 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[[2]]$n) ), NULL )
...
plot arguments can be passed (except xlim, ylim,ylab,pch,xaxt for component plot, and xlab, ylab for screeplot)

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)).

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.(submitted) http://c3s2i.free.fr/cv/recentpub.html

See Also

PTAk, PTA3, FCAk,SVDgen

Examples

Run this code
#  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()

Run the code above in your browser using DataLab