New answers tagged

0

You can think about each of your data points as a sample from a categorical distribution. That is, each of the two alleles for an individual at a locus will have one of $k$ possible allele types for that locus, with probability $p_i$ of having allele type $i$. You suspect that your 25 populations will differ in terms of their categorical distributions for ...


0

Personally, I decided to use the JSD divergence.


0

My initial reaction is to use a logistic regression. First, you would need to restructure your data. In the cake example, you'd create a new dataset with three variables: (1) dropout indicator, (2) cake, and (3) blindfold indicator. Each row represents a unique person x cake x blindfold combination. A) Do dropout rates differ by cakes? You can just ...


5

When R includes a factor in a regression-type model such as yours, it automatically converts that factor to a set of dummy variables. R accomplishes this by setting aside the first level of the factor - which will be treated as the reference level - and introducing dummy variables for comparing the mean value of the response variable for all other levels ...


0

Results will depend on the numbers of non-v events in each group. If data are as below, with counts of v in a and non-v in b, so that the total number of events in each group is 100, then the null hypothesis that probabilities of v are homogeneous among groups is overwhelming rejected with P-value nearly 0. The test is a chi-squared test of homogeneity. (...


0

Here is an example in R, using the iris data set. I will estimate a distance matrix on the columns using the Manhattan distance, this is your (di)simmilarity matrix, where lower values mean that the variables are more similar, higher values mean they are not very similar. distances=dist(t(iris[,-5]),method="manhattan") which looks like this ...


0

Looks like ive found it - Cohens Kappa for inter-rater reliability


3

You can always look at the variance of the counts, but looking at your description, entropy seems to be a natural choice, since it meets all of your criteria. Entropy is defined as $$ S = -\sum_i p_i \log p_i $$ where $p_i$ is a probability of observing $i$-th category. The more uniform would be the distribution, the higher entropy it displays, so it is ...


1

You can look at coefficient estimates and choose the two categories which have the largest negative coefficients


0

You said in comments that you'd like to know: if you have a tumor present, do you have more alterations? So, number of alterations is actually the outcome, or $y$ variable, and tumor is the independent variable, or $x$ variable. You may have meant the reverse. Regardless of which you are treating as the outcome, for basic descriptive statistics, many of us ...


0

You could try multinomial logistic regression, see for example Multinomial logistic regression vs one-vs-rest binary logistic regression and search this site. Use the Color variable as a (nominal) outcome variable, and the other variables as predictors. From the fitted model you will get fitted/predicted probabilities for each color, for each case. Then ...


0

This is more of an extended comment. The question is interesting and should have a proper answer. You might look as your nominal values as analogous to words in a text, and look at methods for word embedding. Then the embeddings give numerical values which can be used as inputs in a model. There are many posts about that at this site, see this list. Some ...


3

In some situations, researchers know in advance (i.e., when they design their study) what groups they would like to compare with respect to the mean value of an outcome variable. In that case, they would not perform an omnibus ANOVA F-test but rather focus directly on performing the desired a priori group comparisons. In other situations, researchers will ...


1

An $r \times c$ contingency table contains an ordered set of $rc$ count values, which are non-negative integers (i.e., whole numbers that are not negative). The multinomial distribution is one way to generate these numbers. Contrarily, the bivariate normal distribution gives an ordered pair of real numbers, which are not whole numbers and can also be ...


2

The answer is probably entity embeddings for categorical variables. The idea is to employ a strategy similar to word embeddings: put the categories into a lower-dimensional Euclidean space, and a neural network will sort out how to put the more-similar things closer together. This is done by feeding the one-hot data to a linear layer with identity activation ...


1

I assume that you are willing to run some sort of (generalized) linear model in which you want to use this variable. I understood that your treat your risk as a binary variable. And ask if makes any difference for your binary variable to treat it as categorical versus ordinal. If you want to use this variable as a predictor, you may even treat it as a quasi-...


1

One straightforward but potentially inefficient way to handle categorical input in gaussian process is to represent the categorical variables as one-hot encoding. For example, an input with $k$ categories can be represented with a one-hot vector of length $k$ such that only one element of the vector is set to 1 representing the category active for that input....


1

In your first model, the intercept is the expected value for group A when pred1, pred2, and pred3 are all 0. The coefficients for group B and group C are the expected difference from Group A for these other groups (at any value of the pred vars as you have no interactions). (Your example is not fully reproducible as you did not set seed. So I repeat with a ...


0

Your dependent variable is not an "ordinal variable" in the sense of that word in statistical practice. An ordinal variable is a categorical variable having some type of pre-defined order. For example, in this question an expert had pre-ranked a set of companies; regression was used to see how various characteristics of the companies might be related to ...


0

Am I correct that pandas.factorize only recodes the categorical variable as numerical, with numbers as labels, so it is just a numerical variable? That is not the way to treat a categorical variable. There is no reason to be afraid of the 250 new columns, just use sparse matrix methods. And look at the ideas in Principled way of collapsing categorical ...


1

Go for a McNemar test it may give you the accuare results in your case. also you can compare the results from wilcoxon signed rank test i.e dependent test with McNemar test then you can conclude your result. https://rcompanion.org/handbook/H_05.html above link will tell you a path.


1

There's a great answer here that discusses correlation between categorical data. To summarize the main points from this answer (all credit goes to original poster, Alexey Grigorev): Checking if two categorical variables are independent can be done with Chi-Squared test of independence. For the typical Chi Square Test, if we assume that two variables are ...


1

A significant effect in an ANOVA analysis is interpreted as: At least one level of the categorical variable has a mean, which is significantly different from at least one other level. It tells you nothing regarding which group is different from any other group. When a categorical by categorical interaction is added to the model the groups are broken down ...


4

It's true that categorizing continuous variables can lead to some problems, but it can also help approximate a complex model more easily. For the same number of degrees of freedom, though, it might be preferable to fit a flexible linear model (e.g., a spline or polynomial model). That said, there is some (older) literature that justifies splitting into ...


0

Partially answered in comments: Please explain what you mean by "the transformations." It is rare for a numerical transformation of any binary variable to be meaningful. – whuber ( The correlation between DV and the IVs is very low, however, based on the domain it should not. The adjusted R-squared for linear model is just 0.05 and I want to try ...


0

It looks like you want to test if "there are equal counts". That must be reformulated to "equal expected counts" to be a valid hypothesis. That is a model, namely, an equal probability model on 4 different levels of a categorical variable (in R a categorical variable is named a factor,) I do not know about matlab. There is not enough information in your ...


2

You want to predict a binary (0/1) variable, definitely start out with logistic regression. ANOVA is really a variant on usual linear regression (for continuous response), and uses some assumptions that are definite not true for binary response, like constant error variance. As for the numbered points, this is a very broad question ... but note that ...


0

You have a binary (yes/no) response variable, so logistic regression would be amixed model), in R with the lme4 package. If you will post (a link to) the data I can have a look. Assuming enough observations, something like the following code: library(lme4) mod0 <- glmer( status ~ (1 | site/plant), data=your_data_frame, family=binomial ) will fit a pure ...


Top 50 recent answers are included