pgsfit.obj: PGS S3 Class and Methods

Description Usage See Also Examples

View source: R/pgsfit.obj.R

Description

pgsfit.obj is a S3 class to store PGS fitting results. Internally used by pgsfit. pgsfit.obj contains:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
pgsfit.obj(grid.err, lam.sel.vect, beta.shrink.corr.list, var.sand.corr.list,
  hat.R.list, flag.stop.corr.vect, iter.n.corr.vect, best.ind, bestall.ind, eps,
  iter.n, Pm.vect, lam.vect, scale.info, sis.dn, ConvergeMessage)

## S3 method for class 'pgsfit.obj'
print(pgsfit.obj)

## S3 method for class 'pgsfit.obj'
plot(pgsfit.obj, IQR.times = 1.5, text.size = 4,
  xlab.size = 14, ylab.size = 14)

## S3 method for class 'pgsfit.obj'
coef(pgsfit.obj, pm.ind = NULL, p.threshold = 0.05,
  nonzero = TRUE)

See Also

see pgsfit to run PGS algorithm and obtain pgsfit.obj object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Print PGS object:
pgsfit.obj

## Plot PGS object (a heat map visualizes the grid search errors):
plot(pgsfit.obj)

#Other parameters:
#IQR.times: cross-validation errors greater than IQR.times * IQR of the errors will be replaced by "NA" (represented by grey blocks). Default = 1.5.
#text.size: size of the text in grid. Default = 4.
#xlab.size: size of the x-axis labels. Default = 14.
#ylab.size: size of the y-axis labels. Default = 14.

## Return coefficients from PGS object:
coef(pgsfit.obj)

#Other parameters:
#whcih: an interger between 1 to pm.n specifying results at which Pm level to be returned. Defaul = NULL. If NULL, return the best results.
#p.threshold: threshold of p-values to filter out non-significant variables. Default = 0.05.
#nonzero: logical. If TRUE, only variables with non-zero beta results are returned. Default = TRUE.

#For more information, please visit: https://github.com/YinanZheng/PGS/wiki/Example:-miRNA-expression-and-lung-function

YinanZheng/PGS documentation built on June 3, 2017, 9:52 a.m.