Description Usage Arguments Value See Also Examples
pgsfit
is used to fit and determine the best results from penalized GEE method across tunning parameter grid.
1 2 3 4 |
y.vect |
a vector of dependent variable. |
id.vect |
a vector of subjuect ID. |
M |
a data frame or matrix of genomic dataset. Rows represent samples, columns represent variables. |
COV |
a data frame or matrix of covariates dataset. |
sis.obj |
a |
lambda.n |
an integer specifying the number of tunning parameter lambda, the range of lambda is specifyied by |
lambda.lim |
a vector with two numbers specifying the limit of changing lambda for PGS to tune lambda. The lambda sequence is generated by |
pm.n |
an integer specifying the number of Pm levels, starting from 10 to |
pm.max |
an integer specifying the maximum Pm. Default = |
fold |
k-fold cross-validation in calculating grid error. Default = 10. |
nonzero.eps |
non-zero beta threshold. During iteration, if beta estimation is shrinked down below this threshold, it will be forced to be zero. Default = |
eps |
convergence threshold. Iteration stops when the sum of beta estimation errors less than this threshold. Default = |
iter.n |
maximum iteration number. Iteration will stop anyway even if the |
corstr |
a character string specifying the working correlation structure. The following are permitted: independence ( |
parallel |
logical. Enable parallel computing feature. Default = |
ncore |
number of cores to run parallel computation. Effective when |
seed |
an integer specifying seed for cross-validation. If not specified |
variables selection and model fitting results in a pgsfit.obj
object.
see sis
to obtain proper ranked variables; see pgsfit.obj
for class methods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ### Dataset preview
BJdata()
### Convert binary variables into factor type
BJlung$gender = factor(BJlung$gender)
BJlung$heat = factor(BJlung$heat)
BJlung$cigwear = factor(BJlung$cigwear)
### Merge miRNA and lung function dataset
BJdata <- merge(BJmirna, BJlung, by=c("SID","WD"))
### Data must be sorted by study subject ID and multiple measurements indicator
BJdata <- BJdata[with(BJdata, order(SID, WD)), ]
### Extract dependent variable (lung function)
y.vect<-BJdata$FEV1
### Extract subjuect ID variable indicating repeated measures
id.vect<-BJdata$SID
### Extract microRNA data matrix
M<-BJdata[,3:168]
### Extract covariate data matrix
COV<-BJdata[,170:179]
### In the example we use linear mixed-effect model (default) for sure independent screening, ranked by p-values
sis_LMM_par = sis(y.vect, id.vect, M, COV)
### If your computer have multiple cores, it is recommended to enable parallel option (default)
PGSfit = pgsfit(y.vect, id.vect, M, COV, sis_LMM_par, lambda.lim = c(3,5), pm.n = 12, pm.max = 120, seed = 1)
PGSfit # print PGSfit summary
plot(PGSfit) # plot cross-validation error grid
coef(PGSfit) # return PGSfit coefficients
#For more information, please visit: https://github.com/YinanZheng/PGS/wiki/Example:-miRNA-expression-and-lung-function
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.