Description Usage Arguments Author(s) Examples
Plot for a set of individuals in a testing set, a network of individuals in training set in a SSI
1 2 3 4 5 6 | plotNet(fm, B, Z = NULL, K, indexK = NULL, subsetG = NULL,
tst = NULL, U = NULL, d = NULL, group = NULL, group.shape = NULL,
set.color = NULL, set.size = NULL, df = NULL, title, axis.labels = TRUE,
curve = FALSE, bg.color = "gray20", unified = TRUE, ntst = 36,
line.color = "gray90", line.tick = 0.3, legend.pos="right",
point.color = "gray20", sets = c("Testing","Supporting","Non-active"))
|
fm |
An object of the 'SSI' class |
B |
Matrix of regression coefficients with number of rows and number of columns equal to the length of the vectors provided in |
Z |
Design matrix for the random effects. When |
K |
Kinship relationships matrix. This can be a name of a binary file where the matrix is stored |
indexK |
Vector of integers indicating which columns and rows will be read when |
subsetG |
Vector of integers indicating which columns (and rows) from |
tst |
Vector of integers indicating which individuals are in testing set and must be contained in |
U |
Matrix with eigenvectors from spectral value decomposition of G = U D U' |
d |
Vector with eigenvalues from spectral value decomposition of G = U D U' |
group |
Object of the 'dataframe' class with one column grouping for the individuals. The rows must match with the rows in |
df |
Average number of individuals in the training set contributing to the prediction (active) of individuals in the testing set. Default |
title |
A 'character' type string for the plot title |
bg.color |
A 'character' type string indicating the plot background color |
line.color |
A 'character' type string indicating the color of lines connecting 'active' training individuals with each individual in testing set |
line.tick |
A numeric value indicating the tick of lines connecting 'active' training individuals with each individual in testing set |
set.color |
Vector of 'character' strings indicating the color point of each level of 'testing', 'active', and 'non-active' elements, respectively |
set.size |
Vector of 'numeric' values indicating the size of 'testing', 'active', and 'non-active' elements, respectively |
group.shape |
Vector of 'integer' numbers indicating the shape of each level of the grouping column provided |
curve |
|
axis.labels |
|
unified |
|
point.color |
A 'character' type string indicating the color of the points in the plot |
ntst |
Maximum number of individuals in 'testing' that are plotted separated as indicated by |
legend.pos |
Either "right", topright","bottomleft","bottomright","topleft", or "none" indicating where the legend is positioned in the plot |
sets |
Vector of 'character' strings indicating the names of the sets: testing group, predictors with non-zero coefficient, and predictors with zero coefficient in the SSI, respectively |
Marco Lopez-Cruz (lopezcru@msu.edu) and Gustavo de los Campos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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
fm = SSI(y,K=G,tst=1:15,trn=16:length(y))
# Basic setting
plotNet(fm,K=G,bg.color="white",line.color="gray25")
plotNet(fm,K=G,unified=FALSE)
# Passing a matrix of coefficients
B=as.matrix(coef(fm,df=15))
plotNet(fm,B=B,K=G,curve=TRUE,set.size=c(3.5,1.5,1))
# Using Spectral Value Decomposition and grouping
EVD <- eigen(G)
gp <- data.frame(group=kmeans(EVD$vectors[,1:3],centers=5)$cluster)
plotNet(fm,curve=TRUE,group=gp,U=EVD$vectors,d=EVD$values)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.