Description Usage Arguments Value Examples
View source: R/internal_functions.R View source: R/convertbeta.R
The covertbeta function is designed to convert the regression coefficients derived from the standardized data.
1 | convertbeta(X, Y, q, beta0)
|
X |
It is a dataset of explanatory variables. |
Y |
It is the multivariate response variables. |
q |
It is an integer representing the number of explanatory variables and intercept. |
beta0 |
The vector contains the regression coefficients result from sparsenetgls. |
Return the list of converted regression coefficients of the explanatory variables 'betaconv' and intercept value 'betaconv_int'.
1 2 3 4 5 6 | X <- mvrnorm(n=20,mu=rep(0,5),Sigma=Diagonal(5,rep(1,5)))
Y <- mvrnorm(n=20,mu=rep(0.5,10),Sigma=Diagonal(10,rep(1,10)))
fitmodel <- sparsenetgls(responsedata=Y,predictdata=X,nlambda=5,ndist=2,
method='elastic')
#Example of converting the regression coef of the first lamda
convertbeta(X=X,Y=Y,q=5+1,beta0=fitmodel$beta[,1])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.