Covmatrix object (Multivariate Analysis Toolbox for MatlabŪ)

written by: Liran Carmel

Last modified: 15:12, Sun 12-Sep-2010

General Description
This object represents the covariance matrix (or correlation) between variables. It inherits from the parent object vvmatrix.

Navigate to:     General Description     Class Structure     Class Construction     Class Functions

Class Structure
Each field can be accessed by the dot (.) operation, or by the GET function. The GET function can work on multiple instances simultaneously. Most fields, except for those that are Dependent, can be modified using the dot (.) operation, or by the SET function.
    Field Description Type Default Dedicated Get/Set Function  
    vv_type type of data, either 'covariance' or 'correlation' string ''    
    corr_type type of correlation, either 'pearson', 'spearman', or 'kendall' string ''    
    pval p-value for the test whether rho = 0 double matrix of the same dimensions as the field matrix<\i> []    
    sample_size sample size used to compute the correlation/covariance integer matrix of the same dimensions as the field matrix<\i> []    
    type Inherited from vvmatrix. Type of matrix. It is always 'variable-variable' string 'variable-variable'    
    row_units Inherited from vvmatrix. units of the row-variables. cell {}    
    row_level Inherited from vvmatrix. level of the row-variables. Can be nominal/ordinal/numerical/unknown cell {}    
    col_units Inherited from vvmatrix. units of the column-variables. cell {}    
    col_level Inherited from vvmatrix. level of the column-variables. Can be nominal/ordinal/numerical/unknown cell {}    
    is_square Inherited from vvmatrix. true if the row-variables are identical to the column-variable. logical false    
    name Inherited from datamatrix. name of object, should be short and used as identifier. This field will never be empty. string 'unnamed'    
    description Inherited from datamatrix. verbal description of the class content. string ''    
    source Inherited from datamatrix. verbal description of the source of information. string ''    
    row_name Inherited from datamatrix. Name of the row-category (for example, in gene arrays it can be "tissue"). string ''    
    row_sampleset Inherited from datamatrix. A sampleset describing the row-samples. sampleset []    
    row_groupings Inherited from datamatrix. grouping objects associated with the row-samples. grouping array []    
    col_name Inherited from datamatrix. Name of the column-category (for example, in gene arrays it can be "genes"). string ''    
    col_sampleset Inherited from datamatrix. A sampleset describing the column-samples. sampleset []    
    col_groupings Inherited from datamatrix. grouping objects associated with the column-samples. grouping array []    
    matrix Inherited from datamatrix. the data matrix. double []    
    transformations Inherited from datamatrix. keeping track on transformations that had been applied previously on the matrix. structure []    
  Dependent no_rows Inherited from datamatrix. number of row-samples. integer scalar 0 norows  
  Dependent no_cols Inherited from datamatrix. number of column-samples. integer scalar 0 nocols  

Class Construction
Empty instance (scalar)
an empty covmatrix instance, with all fields initialized to their default values.
syntax: cvm = covmatrix;
Empty instance (matrix)
an array of empty covmatrix instances.
syntax: cvm = covmatrix(size,'size');
Copy constructor
one covmatrix instance is copied into another.
syntax: cvm_destination = covmatrix(cvm_origin);
Construction by field names
an instance is formed by directly providing field values. Any field which is not dependent is permitted.
syntax: cvm = covmatrix(field_name, field_value, ...);
Reading-in a matrix
an instance is formed by reading-in an externally provided matrix.
syntax: cvm = covmatrix(matrix);

List of Functions

Display:

show
displays class content. Source: datamatrix.

I/O functions:

xlswrite
writes VVMATRIX data into an excel sheet. Source: vvmatrix.

Inference:

ci
computes confidence intervals for the correlation values.
dependentvariables
reports pairs that are significantly dependent.
testindependence
computes p_values for the independence test.

Information extraction:

colid
finds the IDs of a list of column-variables. Source: datamatrix.
rowid
finds the IDs of a list of row-variables. Source: datamatrix.

SET/GET functions:

colnames
retrieves the column-variable names. Source: datamatrix.
get
get method
matrix
retrieves the variable-by-variable matrix. Source: vvmatrix.
nocols
retrieves the number of columns in DATAMATRIX instances. Source: datamatrix.
norows
retrieves the number of rows in DATAMATRIX instances. Source: datamatrix.
rownames
retrieves the row-variable names. Source: datamatrix.
set
set method

Transformations:

deletecols
eliminate col-variables from a COVMATRIX instance.
deleterows
eliminate row-variables from a COVMATRIX instance.
deletevariables
eliminate the same variables from the rows and columns.

Visualization:

plot
plots the covariance/correlation matrix