Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

Re: [R] Contingency-Coefficient, Variance

Christoph Buser

2005-07-18

Replies:

Hi

You can easily implement it by:

Mag. Ferri Leberl writes:
> Dear Everybody!
> Excuse me for this newbie-questions, but I have not found answers to these
> Question:
>
> - Is there a command calculating the variance if the whole group is known
> (thus dividing by n instead of n-1)?

var(x)*(n-1)/n

>
> - Which is the command to calculate the
> - contingency-coefficient?

Have a look at ?chisq.test
There you can calculate and extract the chi-square statistic and
then it is easy to program the needed formula.
Please note that there is an argument "exact" in
chisq.test(). You can set it on FALSE if you do not want to
apply Yates continuity correction.

Regards,

Christoph Buser

--------------------------------------------------------------
Christoph Buser <buser@(protected)>
Seminar fuer Statistik, LEO C13
ETH (Federal Inst. Technology)  8092 Zurich   SWITZERLAND
phone: x-41-44-632-4673    fax: 632-1228
http://stat.ethz.ch/~buser/
--------------------------------------------------------------


>
> Thank you in advance.
> Mag. Ferri Leberl
>
> ______________________________________________
> R-help@(protected)
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.