⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spm_granger.m.svn-base

📁 try the matlab scripts to do various computations
💻 SVN-BASE
字号:
function [G,Psig] = spm_granger (mar)
% Compute Granger causality matrix 
% FORMAT [G,Psig] = spm_granger (mar)
%
% mar            MAR data structure (see spm_mar.m) 
%
% G              [d x d] matrix with i,jth entry equal to 1 if
%                time series i 'Granger causes' time series j. 
%                All other entries set to 0.
%
% Psig           [d x d] matrix of corresponding significance values
%___________________________________________________________________________
% Copyright (C) 2007 Wellcome Department of Imaging Neuroscience

% Will Penny 
% $Id$

d=size(mar.noise_cov,1);

G=ones(d,d);
Psig=ones(d,d);

for i=1:d,
    for j=1:d,
        con=zeros(d,d);
        con(i,j)=1;
        Psig(i,j)=spm_mar_conn(mar,con);
    end
end

G=Psig<0.05;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -