Description Usage Arguments Author(s) Examples
'coef'
: Retrieves the regression coefficients for each value of lambda for each individual in the testing set. If df
is specified, only the coefficients for the lambda associated to df
are returned. If tst
is specified, only the coefficients for the testing individuals given in tst
are returned.
'fitted'
: Returns the predicted values for each value of lambda (in columns) for each individual in the testing set (in rows). When using 'lars2' or 'solveEN' functions, a matrix X
of predictors is needed
'summary'
: Returns accuracy, MSE, df, achieved by each value of the vector lambda. Also returns summary for the SSI with maximum accuracy and with minimum MSE.
'plot'
: Creates a plot of either accuracy or MSE versus the (average) number of predictors and versus lambda (in negative logarithm).
1 2 3 4 5 6 7 8 9 10 11 |
object |
An object of the class 'SSI'. One or more objects must be passed as |
df |
Average (across testing individuals) number of non-zero regression coefficients |
tst |
Vector of integers indicating which individuals are in testing set. Default |
py |
Indicates whether to plot correlation (between observed and predicted) or MSE in y-axis |
title |
Title of the plot |
... |
Arguments to be passed:
|
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 | 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
fm1 = SSI(y,K=G,tst=1:100,trn=101:length(y),alpha=0.5)
yHat = fitted(fm1) # Predicted values for each SSI
corTST = summary(fm1)$accuracy # Testing set accuracy (correlation cor(y,yHat))
summary(fm1)$optCOR # SSI with maximum accuracy
summary(fm1)$optMSE # SSI with minimum MSE
plot(fm1,title=expression('corr('*y[obs]*','*y[pred]*') vs sparsity'))
plot(fm1,py="MSE",title='Mean Square Error vs sparsity')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.