plot.msma: Plot msma

View source: R/src.r

plot.msmaR Documentation

Plot msma

Description

plot method for class "msma".

Usage

## S3 method for class 'msma'
plot(
  x,
  v = c("weight", "score", "cpev")[1],
  axes = 1,
  axes2 = 1,
  block = c("block", "super")[1],
  plottype = c("bar", "scatter")[1],
  XY = c("X", "Y", "XY")[1],
  col = NULL,
  signflip = FALSE,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

x

an object of class "msma." Usually, a result of a call to msma

v

a character, "weight" for the weight, "score" for the score, and "cpev" for the cumulative percentage of explained variance (CPEV) .

axes

a numeric (or vector), specifying the root component(s) to plot.

axes2

a numeric (or vector), specifying the nested component(s) to plot.

block

a character, indicating which the "block" or "super" is used.

plottype

a character, indicating the plot type. "bar" for the bar plot, "scatter" for the scatter plot.

XY

a character, indicating "X" or "Y". "XY" for the scatter plots using X and Y scores from PLS.

col

a color vector.

signflip

a numeric vector if the sign in the block is flipped to pose the super as possitive.

xlim

a numeric vector x coordinate ranges.

ylim

a numeric vector y coordinate ranges.

...

further arguments passed to or from other methods.

Details

This function provides a plot of results.

Examples

tmpdata = simdata(n = 50, rho = 0.8, Yps = c(10, 12, 15), Xps = 20, seed=1)
X = tmpdata$X; Y = tmpdata$Y 

fit1 = msma(X, Y, comp=1, lambdaX=2, lambdaY=1:3)
#plot(fit1)


msma documentation built on Aug. 25, 2023, 9:07 a.m.