readZ: read the structure and explain it

Description Usage Arguments Value Examples

View source: R/readZ.R

Description

This function describes the structure of sub-regression given by an adjacency matrix. It computes the associated regression coefficients and R-squared for each sub-regression.

Usage

1
2
3
readZ(Z = Z, B = NULL, crit = c("none", "R2", "F", "sigmaX"),
  varnames = NULL, output = c("index", "names", "all"), X = NULL,
  order = 1)

Arguments

Z

binary adjacency matrix of the structure (size p)

B

is the complete structure (Z with sub-regression coefficients instead of 1 and an additional first line for the intercepts)

crit

define the criterion to use: c("none","R2","F","sigmaX")

varnames

the names of the variables (size p)

output

indicates the content of the output: c("index","names","all")

X

is a data frame or matrix containing the dataset

order

define the order used (0: none, -1: decreasing, 1: growing) for printing

Value

a list containing the sub-regressions details. Each item of the list represents a subregression. First element is the R-square.Second element is the variable that is regressed by others. Then comes the list of the explicative variables in the subgression and the associated coefficients (in the first column).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

data<-mtcars
#we first search a sub-regression structure
res=structureFinder(X = data,nbini = 30,verbose=0)
#then we can try to interpret it
readZ(Z = res$Z_opt,crit = "R2",output = "all",X = data)
#each component is a sub-regression
#First line : The adjusted R-squared is given
#Second line : the name of the covariate that is regressed by others
#other lines : Coefficients of sub-regression and name of the associated covariate

## End(Not run)

CorReg documentation built on Sept. 6, 2019, 3 a.m.