This function calculates the Risk Ratio and the Odds Ratio (OR) on a 2x2 input matrix. Both ratios are computed with confidence intervals. If confidence interval of OR doesn't encompass the value OR=1, then the function computes the Bayesian Credibility Assessment of the test. If the test is credible, the function calculates the Association Parameter Phi. The association parameter Phi=sqrt(chisquare/N). The routine coumputes the Power and, if necessary, the sample sizes needed to achieve a power=0.80 using a modified asymptotic normal method with continuity correction as described by Hardeo Sahai and Anwer Khurshid in Statistics in Medicine, 1996, Vol. 15, Issue 1: 1-21.

I do admit I messed up the arithmetic bit of my example and should have said:
so RR = (17/1707)/(7/1786) but my numeric answer was correct to 4d.p. I had 1779 instead of 1707.

But from the WIKI def of Risk Ratio (RR):

RR = [a/(a+b)]/[c/(c+d)]

then given RR, and using our data,
e.g. a=17,b=1690,c=7,d=1779
where a+b= 17+1690=1707
and c+d=7+1779=1886

...my input matrix must be
x1 = [ 17, 7;
1707, 1786];

which corresponds to:
(17/1707)/(7/1786)

I don't understand, and please forgive me , why I use this
matrix >> x=[17 1690;
7 1779];

It does not fit your ODDS header input example and does not fit the WIKI def. either.

Also is it possible to add P-values to the ODDS function?

Look well the matrix you gave to odds!
you wrote x1 = [17, 7; 1707 1786];
so a=17, b=7, c=1707 and d=1786.
If you use the correct matrix of your example
>> x=[17 1690;7 1779];
>> odds(x)
Significance level: 95%

Hello Giuseppe,
I ran your ODDS function for a microbiologist's data set and we both feel after a little research that ODDS is producing an Odds Ratio rather than a Risk Ratio. Our definitions of Risk ratio and Odds ratio are backed up by WIKI as well and I include the links as well.

You can see that 2.5410 is the Odds ratio according to the data but in fact this should be the Risk Ratio not the value
1.4494 as printed above from ODDS.

We base these assertions on some simple arithmetic backed up by WIKI defs: en.wikipedia.org/wiki/Relative_risk
i.e. Risk Ratio (RR) is defined as:

RR = [a/(a+b)]/[c/(c+d)]

So given this, using our data,
let a=17,b=1690,c=7,d=1779
so RR = (17/1779)/(7/1786) = 0.00996/0.00392 = 2.5410
This is what you have for Odds Ratio but but your Risk Ratio shows 1.4494, a quite different result to 2.5410

Also the Odds Ratio is defined here:
en.wikipedia.org/wiki/Odds_ratio#Example