convertbeta: The convertbeta() function

Description Usage Arguments Value Examples

View source: R/internal_functions.R View source: R/convertbeta.R

Description

The covertbeta function is designed to convert the regression coefficients derived from the standardized data.

Usage

1
convertbeta(X, Y, q, beta0)

Arguments

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.

Value

Return the list of converted regression coefficients of the explanatory variables 'betaconv' and intercept value 'betaconv_int'.

Examples

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])

superOmics/sparsenetgls documentation built on Sept. 11, 2020, 5:49 a.m.