Causal Connectivity Analysis
Welcome to the Wiki site for the Causal Connectivity Analysis (CCA) MATLAB toolbox. For help on using the Wiki, please see the manual: The PBwiki Manual. This Wiki space is available for all users of the toolbox to share their experiences, bug reports, comments, improvements, etc.
Comments (17)
Anil Seth said
at 3:35 pm on Sep 30, 2009
Some users have been having problems running the demo, with the error "??? Undefined function or method 'marsaglia_normcdf' forinput arguments of type 'double'.". This means you need to recompile a mex file (a mex file is a C-file that can be called from within MATLAB). To do this, open MATLAB and type 'mex -setup'. This will give you a choice of compilers. Choose any (e.g., Lcc-win32). Then navigate to the 'utilities' subdirectory and type 'mex marsaglia_normcdf.c'. All should now be well. Today I've uploaded a new version of the manual explaining this, and a revised function ccaStartup.m that explicitly catches this problem.
Anil Seth said
at 4:48 pm on Sep 30, 2009
.. following on, I've uploaded the revised file ccaStartup.m to this wiki. You should find it under ''Pages and Files". Only download this if you downloaded the toolbox before sep 30 and are having the above problem.
(account deleted) said
at 8:44 pm on Oct 7, 2009
In section 3.2 Detrending and demeaning of the manual, it says that these two preprocessing steps should normally be applied. But at the end of the same section it also says that these steps are used for removing nonstationarity in the mean. Does this mean that these preprocessing steps should be applied to all data or just to data that is non-CS?
Anil Seth said
at 4:20 pm on Jan 4, 2010
New version of the toolbox just uploaded (dec 25 christmas edition!). Contains minor bug fixes plus new ways of testing stationarity using the KPSS test. Also, the ADF test is modified to deal with multitrial data.
goya said
at 10:10 am on Jan 20, 2010
Hello, I am having trouble in the item (ii) from the ccaStartup.m . The mex - setup offers me 3 options (1:*/f90opts.sh, 2:*/gccopts.sh, 3:*/mexopts.sh) to overwrite the mex files, but I have found no option or file related to utilities/marsaglia_normcdf.c . Any suggestions to solve the problem? Many thanks in advance.
Anil Seth said
at 4:36 pm on Jan 24, 2010
The first comment should still apply. mex -setup gives you a choice of compilers, choose any one (e.g., 'lcc'). Then, to compile the file you must explicitly type 'mex marsaglia_normcdf.m'. If there is still trouble, try deleting any existing marsaglia_normcdf files with a .mex extension and try again. Out of interest, what OS are you using?
goya said
at 11:27 am on Jan 25, 2010
The problem is actually that I find no marsaglia_normcdf files. When explicitly written as a command in SPM, it says marsaglia_normcdf.c "is not a normal file or does not exist". Actively searching for it I cannot even find the 'utilities' folder. What should be done?
The OS is Linux.
Joachim said
at 2:04 pm on Feb 3, 2010
It seems there is a bug in cca_pwcausal
If statflag is 1 it tries to execute
A = armorf_to_cca(A,nvar,nlags);
But the input A is not defined
Clark_d said
at 7:37 am on Mar 2, 2010
When running demo, I have this problem: "??? Undefined function or method 'center' for input arguments of type 'double'". What does this mean, could anybody help me, thanks?
Chris said
at 4:45 pm on Mar 7, 2010
Clark--I had the exact same problem. If you look in the cca_olss.m file you will see the 'center' function at the bottom, the last few lines. You will also notice there is already another function command in this file. Matlab will not recognize two different function calls within 1 m-file. So I created a new m-file, called cca_center.m, and copied the center code into that file. Then you just have to insert a command line in cca_olss.m, at the line right before where you see the 'center', to call the newly created cca_center.m function. Mine looked something like this: XC=cca_center(y). You will also have to change the current line in the cca_olss.m file that has 'center' in it. My change replaced all instances of 'center(y)' with XC (which would be the output from the newly created center function). After I made this change the demo worked great. If you are not too proficient with MATLAB I can list my code here if that would help--just let me know.
Clark_d said
at 9:09 am on Mar 8, 2010
Thank you very much, Chris! I put the function center in a new file named 'center', and it works.
Clark_d said
at 9:55 am on Mar 9, 2010
When we run "cca_permutebstrap_demo(GENFLAG)", we need the two files "temp.mat" and 'cca_plotcausality_spectral_temp'. But it seems they are missing in the toolbox. Does anybody have them or know where they are?
Thank you.
Anil Seth said
at 4:31 pm on Mar 9, 2010
Hi all. I think all bugs are now corrected. cca_pwcausal is fixed (joachim comment) and there is a dedicated function cca_center.m in the utilities file. All this is correct as of the dec 25 release. I will upload to this site a new version of cca_permutebstrap_demo.m.
paclink said
at 5:00 pm on Mar 9, 2010
I run the code on the Mac OS X, follow every step in the manual, and still have a problem with the mex file in the ccaStartup.
Or I should run the code on the Window instead?
Clark_d said
at 3:04 am on Mar 10, 2010
Mine is GCCA_toolbox_dec25, but there is no 'cca_center' or "temp.mat" or 'cca_plotcausality_spectral_temp'. How come?
paclink said
at 10:57 pm on Mar 10, 2010
I'm wondering if I want to use G-causality in the group-level analysis, should I consider each subject a single trial data for the GCCA?
I couldn't find how to analyze the connectivity of fMRI data at group level in the manual.
Anil Seth said
at 2:02 pm on Mar 12, 2010
(i) cca_center has now been uploaded to this wiki. (ii) you don't need 'temp.mat' or 'cca_plotcausality_spectral_temp' - the new version of cca_permutebstrap_demo does not need this files. (ii) group level fMRI is not something I'm familiar with; however, it would seem to make sense to analyze each subject separately using GCCA. There is a new paper in Neuroimage (with Steven Bressler) that addresses some of these issues: http://dx.doi.org/10.1016/j.neuroimage.2010.02.059. (iii) I have no experience of the Mac OS environment - sorry about that.
You don't have permission to comment on this page.