Rank: 239682 based on 0 downloads (last 30 days) and 0 file submitted
photo

Sébastien Dubuis

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Sébastien View all
Updated File Comments Rating
08 Feb 2012 MATLAB R-link Functions for calling the statistical package R from within MATLAB. Author: Robert Henson

Hi,

I had the same problem as others. My command was:

a=[1,1,1,2,2,2,3,3,4,4];
b=[1,1,1,2,2,2,3,3,4,4];
putRdata('a',a)
putRdata('b',b);
evalR('c<-fisher.test(a,b)$p.value')

And the result was the error:
'Problem evaluating command c<-fisher.test(a,b)$p.value.
Invoke Error, Dispatch Exception: Object is static; operation not allowed'

My solution was to 'write' down the command to add the data. Then it worked perfectly.
In my case:

X=num2str(a);
X=strrep(X,' ',',');
eval(['evalR(''a<-c(' X ')'')'])
X2=num2str(b);
X2=strrep(X2,' ',',');
eval(['evalR(''b<-c(' X2')'')'])
evalR('c<-fisher.test(a,b)$p.value')

I thought this (ugly) trick might help some people here.

Sébastien

18 Jan 2011 Fisher's exact test with n x m contingency table Do you have problem with Fisher's exact test where the contingency table is more than 2*2? Author: Guangdi Li

I think there just a mistake in the comments:

% If Sig=1, then variables in XVector and YVector are independent.
% If Sig=0, then variables in XVector and YVector are dependent.

Wouldn't it be the opposite since a significant p-value will get to (as said in Wolfram Mathworld) a "statistically significant association" ?

Contact us