Home > brede > brede_mat_glm_testable.m

brede_mat_glm_testable

PURPOSE ^

brede_mat_glm_testable - Test is a certain contrast is testable

SYNOPSIS ^

function b = brede_mat_glm_testable(X, C)

DESCRIPTION ^

 brede_mat_glm_testable - Test is a certain contrast is testable

       b = brede_mat_glm_testable(X, C)

       Input:  X   Design matrix 
               C   Contrast matrix/vector
       
       Output: b   Binary value

       This function examines whether a contrast is testable with
       respect to a given design matrix in the general linear model. 
          
       The function returns true (1) if the contrast is testable and
       zero (0) if not.

       The contrast may be given in a short form. In this case zeros
       will be padded so it obtains the same number of columns as the
       design matrix.

       Example:
         % t-contrasts
         X = [ 1 0 1 ; 0 1 1 ; 1 0 1 ; 0 1 1 ; 1 0 1 ; 0 1 1 ];
         brede_mat_glm_testable(X, [1 0 0])  % Not testable
         brede_mat_glm_testable(X, 1)        % The same - short form
         brede_mat_glm_testable(X, [1 -1 0]) % Ok

         % F-contrasts
         X = [1 0 0 1;0 1 0 1;0 0 1 1;1 0 0 1;0 1 0 1;0 0 1 1];
         brede_mat_glm_testable(X, eye(3))           % Not testable
         brede_mat_glm_testable(X, [2 -1 -1;-1 2 -1;-1 -1 2])  % Ok
         brede_mat_glm_testable(X, [ 1 -1 0 ; 0 1 -1 ])        % Ok    

       See also BREDE, BREDE_MAT_GLM, BREDE_MAT_GLM_EST.

 $Id: brede_mat_glm_testable.m,v 1.1 2008/02/13 22:25:45 fn Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005