plotPath: Coefficients path plot

Description Usage Arguments Author(s) Examples

Description

Plot the coefficients evolution path along the regularization parameter

Usage

1
2
plotPath(fm, Z = NULL, K = NULL, indexK = NULL, 
   tst = NULL, title = NULL, maxCor = 0.85)

Arguments

fm

An object of the 'LASSO' or 'SSI' class

Z

Design matrix for the random effects. When Z=NULL an identity matrix is considered (default) thus G = K; otherwise G = Z K Z' is used

K

Kinship relationships matrix. This can be a name of a binary file where the matrix is stored. Only needed when a fm object of the class 'SSI' is provided

indexK

Vector of integers indicating which columns and rows will be read when K is the name of a binary file. Default indexK=NULL will read the whole matrix

tst

Vector of integers indicating which individuals are in testing set and must be contained in fm$tst. Default tst=NULL will consider the whole vector fm$tst to plot

title

A 'character' type string for the plot title

maxCor

Maximum correlation allowed for two different coefficients. A group of coeffcients with a correlation greater than maxCor are likely to overlap in the plot thus only one is kept

Author(s)

Marco Lopez-Cruz (lopezcru@msu.edu) and Gustavo de los Campos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  require(SFSI)
  data(wheatHTP)
  X = scale(X[1:300,])         # Subset and scale markers
  G = tcrossprod(X)/ncol(X)    # Genomic relationship matrix
  y = scale(Y[1:300,"YLD"])    # Subset response variable
  WL = scale(WL[1:300,])       # Reflectance data
  
  # Sparse phenotypic regression
  fm1 = lars2(var(WL),cov(y,WL))
  
  # Sparse family index
  fm2 = SSI(y,K=G,tst=1:15,trn=16:length(y))
  
  ## Not run: 
  plotPath(fm1)
  plotPath(fm2,maxCor=0.6)
  plotPath(fm2,K=G,maxCor=0.6)
  
## End(Not run)
  
  # Path plot for the first individual in testing set for the SSI
  plotPath(fm2,K=G,tst=fm2$tst[1])

MarcooLopez/SFSI_data documentation built on April 15, 2021, 10:53 a.m.