Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [contingency-tables]

Tables of counts (occasionally proportions of marginal counts), arranged by (at least) two marginal categories, displaying bivariate or multivariate frequencies. Sometimes called crosstabs.

0
votes
1answer
12 views

How to interpret cell values from statsmodels contingency table methods?

The documentation for the methods in statsmodels.stats.contingency_tables.Table is sparse; for example, for fittedvalues() it describes it "returns fitted cell ...
0
votes
0answers
14 views

Parameters, constraints and MLE of log-linear models

I want to use log-linear models to assess the type of (in)dependence between variables in $2\times2$ and $2\times2\times2$ contingency tables. In the process of doing so I would also like to ...
1
vote
1answer
30 views

Is Fisher's exact test the most powerful test for 2x2 contingency table?

I don't find the powerfulness of Fisher's exact test on Wikipedia. Are there any results about the power of FET vs other methods on 2x2 contingency tables?
0
votes
0answers
13 views

When to use a multicategory logit model versus a loglinear model?

Do you only use the baseline-category logit model when categorical responses have more than 2 categories? How is this different than the loglinear model, which is useful when at least 2 variables in ...
0
votes
0answers
5 views

Apply a function to a data frame with numeric objects and print decimal points/trailing zeroes [migrated]

I have a data frame with numeric objects from a contingency table in it: ...
0
votes
0answers
8 views

Statistical significance in a sub contingency table

I have a contingency table of data for the twelve months of the year (i.e., a 2 x 12 table), and I want to evaluate the difference between two particular months (the probability of their values being ...
0
votes
0answers
15 views

Analysing contingency table with small samples

My question is about how to analyse very small samples on contingency tables. I have a contingency table with observation for 2 groups (first variable) answering questions with multiple choices (...
0
votes
0answers
12 views

Conditional Testing of Two-way Contingency Independence

I am reading about testing independence in two-way contingency tables from Mood Graybill and Boes's Introduction to the Theory of Statistics and is confused about testing independence. We have a two-...
0
votes
1answer
26 views

Two sample T test frequency table

I am struggling with a data analysis. I have made a survey and got the following answers in the first turn, I put them in a frequency table Don't agree at all: 8 Don't agree: 6 I don't know: 16 ...
0
votes
0answers
30 views

How to compute multiple Chi^2 P-values for each of a factor in a 3-way contingency table?

How were the p-values calculated using chi^2 (method cited in paper below) in the following table. Its a three way contingency table, tumor stage 1-4, race B/W and hospital city/university. They have ...
1
vote
0answers
24 views

Testing for non-zero values above and below the diagonal of a matrix

I have a $n\times n$ contingency matrix comparing count data (classification) of two procedures. I want to test for non-zero values above and below the diagonal (different classifications in both ...
1
vote
1answer
108 views

Is the Chi-Square Test of Independence the best option for 3x2 contingency table?

I have some data which in the terms of a 3x2 contingency table look in the following way. ...
0
votes
0answers
18 views

How can I calculate and what is the covariance in the contingency table?

In the following contingency table how can I calculate the covariance of the Age and Salary of 300 employees?
1
vote
1answer
28 views

Sample size needed to prove equal proportions

We are trying to prove that three groups have the same proportion of some effect. We are struggling with formulating the null hypothesis, and whether or not the sample size is big enough. The ...
1
vote
1answer
33 views

Are there any statistical tests or measures for paired data with more than two groups?

Are there any statistical tests or measures for paired data with more than two groups? My dependent variable is pretty flexible, but I'd really like to have five independent variables compared ...
0
votes
0answers
14 views

Overdispersed proportion test?

I am comparing proportions in genomic data. In particular, I compare two populations, A and B, and I look at genetic sites. In other words, I have N contingency tables ...
0
votes
0answers
18 views

Test of independence for response frequencies with multiple responses per user

Scenario: We have users in two categories, A and B. In each category, a user can provide a response which can be X, Y or Z. A user can provide one or many responses. Therefore, every subsequent ...
1
vote
1answer
29 views

Correlation between musical knowledge and some measured variables

I have this table: The table shows the occurrences for each feature and separates whether one has or not musical knowledge. I'd like to show in the test column a 'number' that could tell how strong a ...
1
vote
0answers
23 views

How to test for significant 2D movement including distance and direction?

We performed a controlled experiment where the experimental units are aquariums with either no treatment or application of a treatment with several replicates of each. Within the aquariums, there were ...
0
votes
0answers
16 views

Stats for habitat preferences

I have what I think is a three level contingency table, with time spent in three habitats for two species, and whether their 'condition' was in the presence of a competitor species or not. example ...
1
vote
0answers
15 views

Obtaining measures of effect for contingency tables with multiply imputed data

The epi.2by2 function in the epiR package computes a chi-square test and provides measures of effect when count data are ...
1
vote
1answer
91 views

Comparison of proportions using McNemar's Chi-Square using Pre- and Post- data for two disease conditions

This question follows-up on the post: What is the difference between McNemar's test and the chi-squared test, and how do you know when to use each? I am examining a pre- and post- intervention data ...
0
votes
0answers
41 views

Compare frequencies in HUGE number of categories

I have 2 samples, each with many (e.g. 100'000) different categories (colors in urn model), and counts for each category (number of balls of each color - many with few counts, and few with higher ...
1
vote
0answers
25 views

Best test for 2xK contingency table with low cell counts and small overall sample size?

I am looking for the optimal test to use on a contingency table with 2 categorical variables (first variable has 2 levels, second has 4 variables). The cell counts can be as low as 1 or 2 and the ...
0
votes
0answers
12 views

Analyzing/modelling discrete numerical responses and determining associations based on categorical co-variates

I need and would be grateful for some advice regarding the analysis of some data that has been gathered and coded by a third party. The data is part of a project regarding performance in the health ...
0
votes
0answers
19 views

Relationship between chisquare test for trend and linear regression

In his book "Medical Statsitics, Fourth Edition", Martin bland explains that the chisquare test for trend can be used to evaluate a trend in a contingency table. He uses the following example: ...
3
votes
2answers
73 views

Given the marginals of a contingency table, what is the maximum observable value for the $\chi^2$ Pearson statistic?

I know that given a $R\times C$ contingency table observed on $N$ subjects, the maximum value of $\chi^2$ statistics is $N\cdot [\min(R,C)-1]$. But, this is independent of given margins (namely, row ...
2
votes
1answer
204 views

In statistics, is there a formal name to the two variables of a two-dimensional contingency table?

Is there a formal terminology for the variable in the columns and for the variable in the rows?
2
votes
1answer
52 views

Standard error of a proportion on a 2 x 2 contingency table

Why on a 2 x 2 table such as where $p = \frac{a}{a+b}$ the standard error of $p$ is $$\left(\frac{(a+c)(b+d)}{(a+b+c+d)^2(a+b) }\right)^{1/2}$$ ?
1
vote
0answers
20 views

Power analysis for contingency table

Following a cardiac surgery a patient will be classified into one of four categories: Nothing, Mild, Moderate, Severe. There is a new test which, when performed after the surgery, claims to be able to ...
0
votes
1answer
75 views

Significant Fisher's exact test, post hoc analysis for subgroup comparisons?

I'm analysing 2 groups of patients with 2 different DISEASE_STAGES: MILD disease and MODERATE disease, as defined by a complex clinical diagnosis. The sample size is relatively small: a total of 80 ...
0
votes
1answer
31 views

in contingency tables with significant association, how to measure the degree of association?

with contingency tables (RxC, not square) measuring the force of association with the cramer´v test. I know that the strength of association is moderate, but I want to know the grade of that ...
1
vote
3answers
144 views

How to calculate the p-value of a test, that checked for a binary property?

16081 subjects were randomly assigned into two groups: test group: 7916 subjects control group: 8165 subjects Only the test group was exposed to something. During the test period 10 subjects of ...
0
votes
1answer
51 views

Interpret Chi-square test

I'm trying to test for dependence between gender and passing a study unit. The contingency table is as below ...
0
votes
1answer
52 views

Analysis of two categorical independent variables with one categorical (ordinal) and one continuous dependent variables

I am trying to understand how best to analyze my data, or find similar examples. I have two independent variables: Treatment (11 categorical levels) and Genotype (2 categorical levels). I then ...
1
vote
1answer
62 views

Estimate confidence intervals for the P value of the Pearson's Chi-squared test [duplicate]

I have a contingency table where I estimate the p value Pearson's Chi-squared test, I want to take a confidence interval to validate this value P some code to do this by simulation monte carlo? ...
1
vote
2answers
374 views

Contingency table (2x4) - right test & confidence intervals

I have 2 categorical variables for each observation in my dataset: environment and behaviour. I'm trying to test association between them i.e. does the environment affect behaviour? The resulting ...
3
votes
1answer
63 views

Difficulty understanding contingency table and logistic regression coefficient

I have the following contingency table D not-D E 980 122 not-E 2420 6439 where D may stand for disease, and E for exposure. This leads to the ...
3
votes
2answers
405 views

Is a Fisher's Exact test in a 7x9 contingency table feasible?

I have a question regarding the use of SPSS (i.e. its capability) to execute a Fisher's Exact test for large, sparse RxC contingency tables. I would like to test whether or not a certain correlation ...
1
vote
1answer
108 views

Is a chi-square test for independence appropriate on a contingency table where one category is the unsupervised learning cluster?

I have a data set that has been partitioned into four clusters by executing a clustering algorithm that used principal components from a principal component analysis (PCA). I then make a contingency ...
0
votes
0answers
9 views

How to compare 3 dependent conditions?

I have the result of an experiment for N subjects. The experiment results in 3 possibilities, the subject choose A, B or C. For each subject, the experiment is repeated 10 times. So I have ...
3
votes
1answer
106 views

Comparing two grade distributions

I have the following contingency table showing student grades in 2017 and 2018. Student populations are different in both years. In 2018, a different exam format is introduced. The research questions ...
-1
votes
1answer
72 views

chi2 + z-test not yielding the same results?

With a 2x2 contingency table, I believe a chi2 test should be equivalent to a z-test -- from Wikipedia: "Two-by-two contingency tables: When the test is applied to a contingency table containing two ...
0
votes
0answers
15 views

Interpretation of EQUIVNONINF (gofind_t) test

Does anyone know how we can interpret the result of: EQUIVNONINF:gofind_t(alpha,r,s,eps,xv) I run the following code on this contingency table to find whether ...
0
votes
1answer
39 views

Multinomial equivalence test?

I was wondering if there is any statistical equivalence test (in r or python) for multinomial data "a contingency table (4x4)" to know whether the observed and the expected values are equivalence?
1
vote
0answers
32 views

Computing confidence intervals for effect sizes from a contingency table

I am studying the relationship between two categorical variables, $X_1$ and $X_2$. Per observation, $X_1$ can take on 1 of 4 possible values, whereas $X_2$ can take on 1 of 3. To test the ...
1
vote
0answers
24 views

Chisquare for homogenity on subsets of samples for more detailed statements?

I have two samples of six treatment groups. The outcome is an amount of positives. The treatments in both samples are the same, the measured outcome is different but dichotomous in both samples. I ...
2
votes
0answers
75 views

Probability of a contingency table with given marginals

In Fisher's exact test we consider all contingency tables $(n_{ij})_{i,j=0,1}$ consistent with given marginals $(n_{0.},n_{1.},n_{.0},n_{.1})$, where $\sum_i n_{i.}=\sum_j n_{.j}=N$. Each table has ...
0
votes
1answer
46 views

Newton-Raphson Error

According to Agresti(2013) pg 364-365, iterative methods such as Newton-Raphson methods, $ \begin{aligned} \beta^\text{new} &= \beta^\text{old} + (X^{T}WX)^{-1}X^{T}(V) \end{aligned} $ help to ...
0
votes
0answers
37 views

Triangle-shaped contigency tables

Suppose there are random values $\xi,\eta \in \{0,1,2\}.$ I have two samples by which I can build following contigency table: \begin{array}{|c|c|c|c|} \hline \eta \text{\\} \xi& 0 & 1 & ...