plot.lpls: Function for making correlation loadings plot from...

Description Usage Arguments Author(s) Examples

View source: R/plot.lpls.R

Description

This function enables plotting of correlation loadings from an endo- or exo-lpls object.

Usage

1
plot.lpls(fit, comps = c(1, 2), doplot = c(TRUE, TRUE, TRUE), level = c(2, 2, 2), arrow = c(1, 0, 1), xlim = c(-1, 1), ylim = c(-1, 1), samplecol = 4, pathcol = 2, varcol = "grey70", varsize = 1, sampleindex = 1:dim(fit$R22)[1], pathindex = 1:dim(fit$R3)[1], varindex = 1:dim(fit$R21)[1])

Arguments

fit

A fitted lpls-object

comps

A vector of two elements indicating which components to plot.

doplot

A logical vector of three elements corresponding to X1, X2 and X3, respectively. A value TRUE will plot the loadings for the corresponding matrix.

level

A vector of length three giving the plot level for each matrix; level=1 gives dots, whereas level=2 uses dimnames as plotting symbols.

arrow

A vector of length three indicating the use of arrows from the origin to the loading value (1), or no arrow (0) for each matrix.

xlim

The plot limits of the x-axis

ylim

The plot limits of the y-axis

samplecol

The color for the R22-values (samples of X2)

pathcol

The color for R3

varcol

The color for the R21-values (variables of X2)

varsize

Size of plotting symbol for the R21-values (variables of X2)

sampleindex

Which samples to plot

pathindex

Which columns of X3 to plot

varindex

Which variables of X2 to plot

Author(s)

Solve S<c3><a6>b<c3><b8>

Examples

1
2
3
4
5
6
7
8
9
    simdata <- lpls.sim()
    X1 <- simdata$X1
    X2 <- simdata$X2
    X3 <- simdata$X3
    
    #To run exo-LPLS with orthogonal scores:
    fit.exo <- lpls(X1,X2,t(X3), npc=2, type="exo_ort")
    #Correlation plots:
    plot(fit.exo)

solvsa/lpls documentation built on May 30, 2019, 6:10 a.m.