Displaying 20 results from an estimated 200 matches similar to: "How to solve empty cells in the contingency table?"
2011 Jun 14
0
Analyzing three-way contingency tables with many zero cells
Hi all,
I am trying to analyze the following data. The first three columns are
categorical variables (colors of three traits for a peripatus species)
and the last column the count of individuals in each three-way
classification. I wish to test if the three traits vary independently or
if they are correlated across individuals, i.e. - this is a basic three
way contingency table question.
2006 Sep 28
0
mx2 contingency tables or (2^(m-1)-1)'s 2x2 contingency tables in the context of feature selection for random forest
Dear Listers:
I have a categorical feature selection problem for random forest.
Suppose I have a multiple-leveled category variable A, which has m=3
levels: red, green, and blue and the final target is binary
classification.
I want to evaluate its power in discrimination between 2 classes. We
know rf splits multiple-leveled category variable by considering all
combinations of its levels. So
2002 Aug 10
1
GLM Contingency table regressions
I have a contingency table with a 0/1 variable (fwr) that flags a particular
condition, a weight variable (cnt) and other variables (e.g. zz)
characterizing that observation of the table.
I am trying to use GLM. By converting the variables to factors and running
the following regression:
fwr1<-factor(fwr)
zz1<-factor(zz1)
res1<-glm(fwr1 ~ zz1,weights=cnt)
Is that appropriate?
Paul M.
2006 Oct 17
1
Convert Contingency Table to Flat File
Hello All,
Is there any R function out there to turn a multi-way contingency table back to a flat file table of individual rows and attribute columns.?
Thanks!
marco
---------------------------------
[[alternative HTML version deleted]]
2011 Aug 29
1
Generating contingency tables from the null
Hi all,
I have a 3x4 contingency table with row totals all being 100. I want to
generate 3 x 4 tables from the null distribution. Which R function can do
this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2009 Dec 09
1
Exporting Contingency Tables with xtable
Dear R-philes:
I am having an issue with exporting contingency tables with xtable().
I set up a contingency and convert it to a matrix for passing to
xtable() as shown below.
v.cont.table <- table(v_lda$class, grps,
dnn=c("predicted", "observed"))
v.cont.mat <- as.matrix(v.cont.table)
Both produce output as follows:
observed
predicted uh uh~
uh 201
2010 Jun 22
1
Bayesian Code for contingency tables
Hello,
Is there anywhere I can find some Bayesian Code for 2 by 2 tables or even
the non-central hypergeometric distribution in R? Packages would be helpful
but the actual coding in R is much better.
Thanks,
Thanks Jim
[[alternative HTML version deleted]]
2009 Jun 10
1
Analisys in Multidimensional contingency tables
Dear R-list,
Hi everyone, Im trying to make an analysis of multidimensional contingency
tables using R. I' working with the Agresti example where you have the
data from 3 categories. The thing is how can I do the analisys using the
G2 statistics. Somebody can send me an Idea?
I attach the program where you can find the data.
Best Regards,
> prob1<-
2009 Jan 18
0
Singly ordered contingency tables with lbl_test (coin)
Hi all,
is it possible to perform a linear-by-linear association test (lbl_test, package coin) for a SINGLY ordered table ? And, if yes, how to manage the "scores" ?
Thanks in advance
Gilles - France
[[alternative HTML version deleted]]
2003 Jun 13
0
mca & contingency tables - error: "All variables must be factors"
Hi,
I would like to do a multiple correspondence analysis with the mca function in
the MASS library on data that I have as a contingency table (which I've tried
converting to a data frame).
For example,
=========
> data(HairEyeColor)
> hair.df <- as.data.frame(HairEyeColor)
> hair.df
Hair Eye Sex Freq
1 Black Brown Male 32
2 Brown Brown Male 38
3 Red
2008 Mar 17
1
how to get accumulate contingency table
Hi, all.
I got a lot of help from the this mailing list, it save me a lot of time. Here is my question.
x<-rep(c(2,3,4),20)
y<-sample(rep(c(0,1),30))
tr<-rep(c(1:5),6)
data1<-data.frame(x,y,tr)
data1<-data1[order(data1$tr),]
> data1 x y tr1 2 0 16 4 1 111 3 0 116 2 0 121 4 0 126 3 1 131 2 0 136 4 1 141 3 0 146 2 0 151 4 0 156 3 0 12 3 0 27 2 0
2000 Aug 23
1
3D perspective of a contingency table
How can I draw a 3D perspective of a contingency table, that is
showing 3D bars whose height is in proportion of the table cells?
---------------
Charles RAUX,
Laboratoire d'Economie des Transports
CNRS-Universit? Lumi?re Lyon 2-ENTPE
email : charles.raux at let.ish-lyon.cnrs.fr
http://www.ish-lyon.cnrs.fr/let
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2003 Jul 16
1
The two chisq.test p values differ when the contingency table is transposed! (PR#3486)
Full_Name: Tao Shi
Version: 1.7.0
OS: Windows XP Professional
Submission from: (NULL) (149.142.163.65)
> x
[,1] [,2]
[1,] 149 151
[2,] 1 8
> c2x<-chisq.test(x, simulate.p.value=T, B=100000)$p.value
> for(i in (1:20)){c2x<-c(c2x,chisq.test(x,
simulate.p.value=T,B=100000)$p.value)}
> c2tx<-chisq.test(t(x), simulate.p.value=T, B=100000)$p.value
> for(i in
2003 Aug 21
0
The two chisq.test p values differ when the contingency table (PR#3896)
>>>>> dmurdoch writes:
>> Date: Wed, 16 Jul 2003 01:27:25 +0200 (MET DST)
>> From: shitao@ucla.edu
>>> x
>> [,1] [,2]
>> [1,] 149 151
>> [2,] 1 8
>>> c2x<-chisq.test(x, simulate.p.value=T, B=100000)$p.value
>>> for(i in (1:20)){c2x<-c(c2x,chisq.test(x,
>> simulate.p.value=T,B=100000)$p.value)}
2001 Apr 02
0
Constructing a contingency table
Greetings. I'm having some trouble constructing a contingency table from
raw data (actually read in via RPgSQL). Here's the deal:
- What I've got: a data frame in the form:
Groupcode code1 code2 code3 code4 code5 .. coden
where groupcode is one of {P,C,B,S,U,X} and code{1..n} is TRUE or
FALSE. code{1..n} are NOT mutually exclusive, so between 0 and n of them
can be TRUE.
-
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will
display counts, row, column, and cell percentages in the same
tables....anything similar to crosstabs in S?
Marc W. Zodet, MS
Health Statistician
Center for Cost and Financing Studies
Division of Statistical Research and Methods
2101 East Jefferson Street, Suite 500
Rockville, Maryland 20852
Phone: 301-594-7072
Fax:
2003 Jul 15
1
Why two chisq.test p values differ when the contingency table is transposed?
I'm using R1.7.0 runing with Win XP. Thanks,
...Tao
????????????????????????????????????????????????????????
>x
[,1] [,2]
[1,] 149 151
[2,] 1 8
>t(x)
[,1] [,2]
[1,] 149 1
[2,] 151 8
>chisq.test(x, simulate.p.value=T, B=100000)
Pearson's Chi-squared test with simulated p-value (based on 1e+05
replicates)
data: x
X-squared = 5.2001, df =
2004 Feb 17
2
Generating 2x2 contingency tables
Hello R-users,
I would like to generate two-way contingency tables with zero in one cell. I tried to use the function r2dtable but I could not force one cell to have zero value.
Any Idea?
Best regards..
Mahmoud
[[alternative HTML version deleted]]
2005 Feb 11
3
Profiles graphics in a contingency table
Dear Users,
How can I obtain a profiles graphic in a CT similar to Excel.
Campo Elias PARDO
[[alternative HTML version deleted]]
2007 Aug 08
1
test for contingency table when there are many zeros
Here is my table
> tt
A B
1 297 398
2 470 376
3 30 23
4 3 3
5 0 0
b/c two cells are zero, I can't use chisq.test() in R which gives the
following output;
> chisq.test(tt)
Pearson's Chi-squared test
data: tt
X-squared = NaN, df = 4, p-value = NA
Warning message:
Chi-squared approximation may be incorrect in: chisq.test(tt)
What function should I use