Home > brede > brede_mat_sem.m

brede_mat_sem

PURPOSE ^

brede_mat_sem - Structural equations modeling

SYNOPSIS ^

function [KK, PsiMat] = brede_mat_sem(M, varargin)

DESCRIPTION ^

 brede_mat_sem        - Structural equations modeling

       [K, Psi] = brede_mat_sem(M, 'PropertyName', 'PropertyValue')

       Input:    M     Data matrix as numerical matrix or 'mat'
                       structure 

       Property: Info  [ {0} | integer ] amount of debug information
                 Kinit [ randn(size(M.matrix,2)) | matrix ] Initial
                       structure matrix
                 Mask  [ NaN*ones(M.matrix,2)} | matrix ] Mask
                       indicating with NaN values if the element is
                       free to vary.

       Output:   K     Estimated structure matrix
                 Psi   'Error in equation' covariance in 'mat' structure

       Structural equations modeling with the simple from: 

                 X = X * K + U

       The X matrix should be the input argument, and the 'Mask'
       property should indicate the free parameters. 'U' is the noise
       assumed to be independent gaussian distributed. 

       Example: 
         Ktrue = [ 0 1 -0.3 ; 0 0 0 ; 0 0 0 ]
         X = randn(100,3)*pinv(eye(3)-Ktrue); 
         K = brede_mat_sem(X, 'Mask', [ 0 NaN NaN ; 0 0 0 ; 0 0 0])
         K.matrix
         % This should give approximately [ 0 1 -0.3 0 ; 0 0 0 ; 0 0 0 ]

         % Or:
         K = brede_mat_sem(X, 'Mask', [ 0 1 NaN ; 0 0 0 ; 0 0 0])
         K.matrix

       See also BREDE, BREDE_MAT, BREDE_MAT_SEM_BIC, BREDE_MAT_SEM_GROW,
                BREDE_MAT_SEM_LOGLIKELIHOOD, BREDE_BREDE_MAT_SVD.

 $Id: brede_mat_sem.m,v 1.14 2008/07/01 14:13:52 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