Re: [R] Contingency-Coefficient, Variance

From: Christoph Buser <buser_at_stat.math.ethz.ch>
Date: Mon 18 Jul 2005 - 17:34:03 EST

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@stat.math.ethz.ch> 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@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 18 17:38:57 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST