The question is whether we can find a correlation between two sets of grades (categorical data). Let’s say we have a dog competition and there are 1000 dogs participating. There are two rounds of assessment first round dog owners give their assessment on the scale from A to C. Where A is excellent and C is bad. There are four criteria for assessment during both tours (behaviour etc). second round one judge gives his assessment of one dog based on the same assessment criteria as in round 1. however, grades vary from M - meeting expectation, E - exceeding expectation, B - Bellow expectation. We understand that M is B, E is A and B is C. After two rounds our table would look like:  | dog             | round one | round two | | --------------- | --------- | --------- | | Dog1_criteria1  | A         | B         | | Dog1_criteria2  | A         | E         | | Dog1_criteria3  | A         | E         | | Dog1_criteria4  | B         | M         | | Dog2_criteria1  | A         | E         | | Dog2_criteria2  | B         | M         | | Dog2_criteria3  | A         | E         | | Dog2_criteria4  | C         | B         | ....  How do we find a correlation between the two sets of answers? Thank you!
9969
I am building a regression model and I need to calculate the below to check for correlations   Correlation between 2 Multi level categorical variables Correlation between a Multi level categorical variable and continuous variable  VIF(variance inflation factor) for a Multi level categorical variables   I believe its wrong to use Pearson correlation coefficient for the above scenarios because Pearson only works for 2 continuous variables.   Please answer the below questions   Which correlation coefficient works best for the above cases ?  VIF calculation only works for continuous data so what is the alternative?  What are the assumptions I need to check before I use the correlation coefficient you suggest?  How to implement them in SAS &amp; R?
41814
In my experiment, I asked 50 participants to rank on a 5 point scale which voice they preferred. I summed each particpants' rating for each voice: the total for voice 1 is 95, the total for voice 2 is 186.  Am I correct in doing this? Or should I analyse the raw data?  Which test should I use for this data? Would a t-test work here? Alternatively I thought I could use a chi-square test.   I am interested in seeing if the preference for voice 2 is significant.
18555
I am trying to examine the long-term association between smoking cannabis and a diagnosis of depression. I have survey data from 2 points in time for the same participant (repeated measures). The variable in my dataset are cnb_smoke (1: yes, 0: no), diag_depr (1: yes, 0: no), occasion (1: occasion 1, 2: occasion 2), and ppt_id (unique ID). I am also interested in including the following confounders: sex (1:female,0:male) and age (continuous) What statistical tests, other than multilevel models, can I use to test the long term association; i.e. what model would allow me to account for the repeated measures nature of the design?
52094
I have over 400 open-ended responses. The total has been coded by one rater, and a 10% identical sample of the total has been coded by 2 raters. There is a choice of 14 nominal codes, of which the rater can use any number per case, though most cases have between 1-4 codes. Which statistical test is the most appropriate to determine if I have inter-rater agreement on the 10% sample?   Also am I right in assuming that I will need to treat each code as a variable and look for the level of agreement for each variable?   I'm using SPSS 21.  Much thanks, Kellie
34811
According to Yale:     Categorical variables represent types of data which may be divided into groups       To me, dates do not fit this definition. They are ordinal, as one date is bigger than the date before it. It is also quantitative as it can added, subtracted...etc.  I am interested in correlating these observations to other variables in a sample, so I wanted to perform pre-modelling analysis.  Is my understanding correct?  EDIT:  Thank you for your replies. The general consensus is that dates can either be considered binomial or count data according to these data-type characterisations:   I tried to fit the explanations in the comments to the data-types in wikipedia, but, it doesn't seem to fit what people actually mean, is I'll reread.  EDIT 2: To give context for the question: I am trying to measure the effect of various processes over time, and these effects may not be linear, but cyclical (e.g. the seasons). The observations have dates (dd/mm/yyyy), but the dates are only significant in relation to the other dates.
7015
I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option?
89690
I'm doing a textmining project about a videogame review dataset. I divided de reviews into a positive (reviewgrade > 8) and negative (reviewgrade &lt; 3) and want to draw conclusions based on the frequency of different grading factors mentioned in the text. I now have a dataframe with counts of certain categories mentioned per review.  0    13249 1     1565 2      292 3       65 4       19 5        6 6        4 7        3 8        2 9        1 Name: positive: gameplay, dtype: int64   0    5043 1     348 2      66 3      18 4       8 5       3 Name: negative: gameplay, dtype: int64   For example this are the distributions of the amount of reviews which have a certain amount of mentions of gameplay related words. There are for example 1565 reviews with precisely 1 mention of a word related to the category gameplay.  Now I want to use this data to determine if on average gameplay gets mentioned more in negative context than in positive or vice versa. Because the data is not normal distributed, I assumed a t-test is not appropriate, and found online that a Mann–Whitney U test might be suitable.  &gt; wilcox.test(positive$gameplay, negative$gameplay, alternative = "two.sided", conf.int = TRUE)      Wilcoxon rank sum test with continuity correction  data:  positive$gameplay and negative$gameplay W = 43702925, p-value &lt; 2.2e-16 alternative hypothesis: true location shift is not equal to 0 95 percent confidence interval:  2.963844e-05 4.797412e-05 sample estimates: difference in location            4.995671e-05    I do however get a very high W value, which doesn't seem to be correct. Is this not the appropriate test, or am I interpreting this wrong?
18045
Let's say I test how variable Y depends on variable X under different experimental conditions and obtain the following graph:    The dash lines in the graph above represent linear regression for each data series (experimental setup) and the numbers in the legend denote the Pearson correlation of each data series.  I would like to calculate the "average correlation" (or "mean correlation") between X and Y. May I simply average the r values? What about the "average determination criterion", $R^2$? Should I calculate the average r and than take the square of that value or should I compute the average of individual $R^2$'s?
70359
I noted a fact on Stack Overflow badges.  ● Nice Answer  × 39355 ● Nice Question × 7601   (5.2:1 rate)  ● Good Answer  × 6433 ● Good Question × 1199   (5.3:1 rate)  ● Great Answer  × 712 ● Great Question × 105   (6.8:1 rate)  All in all, since the badges are awarded for the same amount of accumulated votes in each category, it appears that people tend to vote more for the answers than the questions...  Just a thought...
38554
I am wanting to find the correlation between two variables: a categorical vegetation variable (with categories 1-4)  and a continuous variable of erosion (with values anywhere between 0.2 and 9). I think I would be required to use a non parametric test to find the correlation, but bit of a newby to stats so could anyone suggest the best test to use? I also wanted to know how sample size can affect these tests, ie with a sample size of 100 or 1000?
13504
I am having difficulty in how to calculate the Pearson's $\chi^2$ statistic for a contingency table with entries: (3, 0) and (0, 3) (row-wise).  I was studying Agresti's categorical data analysis and found this table. He calculated it as 6.  Through what calculation did he reach this answer?
93158
I've conducted a psychological experiment on the same subject, under two different condition. For each condition I've collected the number of correct and wrong answer for each stimulus (number of trials per stimulus = 10; number of stimulus = 15). From the data collected I fitted a psychometric curve (probit or logit curve), and now I want to compare the results.  Consider subject 1: His answers are collected in the following matrices  **COND_1**     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   0 10   6   0 10   7   1  9   8   4  6   9   5  5   10  7  3   11  8  2   12  7  3   13 10  0   14 10  0   15 10  0  **COND_2**     correct cnt   Y  N   1   0 10   2   2  8   3   2  8   4   3  7   5   2  8   6   4  6   7   8  2   8  10  0   9   8  2   10 10  0   11  9  1   12 10  0   13 10  0   14 10  0   15 10  0  COND_1.1 &lt;- matrix(c(0, 2, 2, 3, 2, 4, 8, 10, 8, 10, 9, 10, 10, 10, 10, 10, 8, 8, 7, 8, 6, 2, 0, 2, 0, 1, 0, 0, 0, 0), byrow=F, ncol=2)  COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 0, 0, 1, 4, 5, 7, 8, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 6, 5, 3, 2, 3, 0, 0, 0), byrow=F, ncol=2)  cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.1 ~ cnt, family = binomial(link = "probit"))  ddprob.2.1 &lt;- glm(COND_2.1 ~ cnt, family = binomial(link = "probit"))     Observing the plot, you can surely say that performance under condition 2 is better then the performance under condition 1. In fact if you compute some parameters like AUC, p25, p50, p75 (the value of the stimulus at which the number of correct answers are 25%, 50% and 75% each) [threshold parameters], you'll see that:  COND_1      COND_2 AUC    &lt;    AUC p25    &gt;    p25 p50    &gt;    p50 p75    &gt;    p75     Now consider subject 2:  COND_1     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   3  7   6   3  7   7   4  6   8   5  5   9   9  1   10  9  1   11 10  0   12 10  0   13 10  0   14 10  0   15 10  0  COND_2     correct cnt   Y  N   1   0 10   2   1  9   3   0 10   4   4  6   5   2  8   6   6  4   7   4  6   8   7  3   9   4  6   10  7  3   11  7  3   12 10  0   13  9  1   14 10  0   15 10  0   COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 3, 3, 4, 5, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 6, 5, 1, 1, 0, 0, 0, 0, 0), byrow=F, ncol=2) COND_2.2 &lt;- matrix(c(0, 1, 0, 4, 2, 6, 4, 7, 4, 7, 7, 10, 9, 10, 10, 10, 9, 10, 6, 8, 4, 6, 3, 6, 3, 3, 0, 1, 0, 0), byrow=F, ncol=2) cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.2 ~ cnt, family = binomial(link = "probit")) ddprob.2.1 &lt;- glm(COND_2.2 ~ cnt, family = binomial(link = "probit"))   The plotted curves are shown in the image below.    Can you say what performance is better? Under condition 1 or under condition 2? Extrapolating AUC, p25, p50, p75, you have:  COND_1      COND_2 AUC     &gt;   AUC p25     &gt;   p25 p50     =   p50 p75     &lt;   p75   So my question is: Is there a method to say that a generic curve (logit, probit or whatelse) is HIGHER then another? Is there a method to compare (a single number of "performance") that describe the differences of the two curves? My example shows that AUC, p25, p50, p75 are not good parameters. I'd like to compute a single numeric parameter for each curves, to make a simple t-paired test, extrapolated from the distribution seen.
98091
From :           To demonstrate the concept of Naïve Bayes Classification, consider the   example displayed in the illustration above. As indicated, the objects   can be classified as either GREEN or RED. My task is to classify new   cases as they arrive, i.e., decide to which class label they belong,   based on the currently exiting objects.      Since there are twice as many GREEN objects as RED, it is reasonable   to believe that a new case (which hasn't been observed yet) is twice   as likely to have membership GREEN rather than RED. In the Bayesian   analysis, this belief is known as the prior probability. Prior   probabilities are based on previous experience, in this case the   percentage of GREEN and RED objects, and often used to predict   outcomes before they actually happen.      Thus, we can write:            Since there is a total of 60 objects, 40 of which are GREEN and 20   RED, our prior probabilities for class membership are:             Having formulated our prior probability, we are now ready to classify   a new object (WHITE circle). Since the objects are well clustered, it   is reasonable to assume that the more GREEN (or RED) objects in the   vicinity of X, the more likely that the new cases belong to that   particular color. To measure this likelihood, we draw a circle around   X which encompasses a number (to be chosen a priori) of points   irrespective of their class labels. Then we calculate the number of   points in the circle belonging to each class label. From this we   calculate the likelihood:            From the illustration above, it is clear that Likelihood of X given   GREEN is smaller than Likelihood of X given RED, since the circle   encompasses 1 GREEN object and 3 RED ones. Thus:                  Although the prior probabilities indicate that X may belong to GREEN   (given that there are twice as many GREEN compared to RED) the   likelihood indicates otherwise; that the class membership of X is RED   (given that there are more RED objects in the vicinity of X than   GREEN). In the Bayesian analysis, the final classification is produced   by combining both sources of information, i.e., the prior and the   likelihood, to form a posterior probability using the so-called Bayes'   rule (named after Rev. Thomas Bayes 1702-1761).            Finally, we classify X as RED since its class membership achieves the   largest posterior probability.   This is where the difficulty of my maths understanding comes in.     p(Cj | x1,x2,x...,xd) is the posterior probability of class membership, i.e., the probability that X belongs to Cj but why write it like this?   Calculating the likelihood?    Posterior Probability?    I never took math, but my understanding of naive bayes is fine I think just when it comes to these decomposed methods confuses me. Could some one help with visualizing these methods and how to write the math out in an understandable way?
27546
A pair is concordant if the subject ranked higher on X also ranks higher on Y. The pair is discordant if the subject ranking higher on X ranks lower on Y. The pair is tied if the subjects have the same classification on X and/or Y.   Say I have a table (e.g., $n_{11}$ is the first cell: $i=1$, $j=1$)  \begin{array}{rrrr}     1   &amp;3   &amp;10    &amp;6  \\     2   &amp;3   &amp;10    &amp;7  \\     1   &amp;6   &amp;14   &amp;12  \\     0   &amp;1    &amp;9   &amp;11 \end{array}  Can you help me to understand how to select the concordant and discordant pairs?  Here's my understanding for concordant: First we select $n_{11}$, then $n_{22}$ is $3$ which is greater than $1$, (higher $Y$ and higher $X$). So we have $1(3+10+7+6+14+12+1+9+11)$, is that right? Then how about $n_{13}$? For $n_{13}$, we have $7$ ($n_{24}$) which is less than $n_{13}$ (lower $Y$). So we don't count this pair right?   I am confused about discordant, how could you select the discordant pairs?
60676
I am trying to understand the relative behavior of the following rank correlation statistics:   Spearman coefficient Kendall Tau / Concordance percentage Normalized Gini coefficient (area under curve of percentage captured versus percentage observations) Normalized Area under ROC curve (for binary classifiers)   I don't believe any of these are functionally related to the others.  The accepted answer  references  and Spearman and Kendall are highly correlated (as one would expect).  Are there good intuitions behind/discussions of relative (across datasets) or absolute (for a given dataset) differences for (any pair of) these measures?
58570
There is a significant 3-way interaction in a data-set I'm working with.  The interaction involves both categorical and quantitative variables.  I have been pointed towards simple slopes and this  but I find the explanations lacking. I only have a basic background in statistics, and Googling for other examples has not been very helpful.   Any insight as to how to begin to understand this interaction will be very welcome, especially using R rather than SPSS. Thank you very much in advance, from a lower-year college student who has suddenly found himself over his head!
99953
Situation: Comparing mean scores of level of satisfaction across multiple institutions and overall.   Let's say there are 50 institutions, all with different sample sizes.   Level of satisfaction is rated 1 to 5.  I was asked to perform a t-Test to determine outliers and significance of the score differences, with a control range for 1 SD and 2 SD.   Eg. Institute = Mean score  Institute A = 3.8 Institute B = 3.9 Institute C = 4.1 . . . Overall = 4.0  This is so that we can rank the institutions based on their mean score.  So here's my question:   How do I make a fair comparison of the mean scores? It is possible? How does a t-Test determine statistical significance in this scenario? Do I look at P-value or overlap in distribution to assess usefulness of the test?  I conducted multiple t-Tests for 2 groups (eg. Institute A &amp; Overall, Institute B &amp; Overall, Institute C &amp; Overall, ...) but I'm aware that it is not appropriate to conduct multiple t-Tests comparing 2 groups at a time. What should I do?   Please kindly help. I am quite lost and confused.