Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [categorical-data]

Categorical (also called nominal) data can take on a limited number of possible values called categories. Categorical values "label", they do not "measure". Please use [ordinal-data] tag for discrete but ordered data types.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

How Does R Encode Nominal Categorical Data? [on hold]

I'm curious to learn how R is able to represent factor variable levels as nominal data while under the hood still converting them into numbers so the computer can understand and run algorithms on this ...
1
vote
1answer
31 views

Logistic regression model that has one categorical variable with multiple values

I have the following data: ...
2
votes
1answer
21 views

Acute kidney injury statistical tests

I am fairly new to statistical analysis and was hoping to get some advice on an analysis I am hoping to run. I have data for children with acute kidney injuries (AKI) classified as a multilevel ...
1
vote
0answers
14 views

Correlation of categorical data to binomial response in R

I'm looking to analyze the correlation between a categorical input variable and a binomial response variable, but I'm not sure how to organize my data or if I'm planning the right analysis. Here's my ...
0
votes
0answers
16 views

How to prepare data with categorical within-subjects variables for multivariate regression? [closed]

I have collected data from small sample which includes the following independent variables: Treatment (categorical): A x B Condition (ordinal): 1 x 2 x 3 4 x 5 x 6 Participant characteristic 1 (...
0
votes
0answers
21 views

How does decision tree divide numerical feature? [duplicate]

As Shown in above decision Tree, sklearn's DecisionTreeClassifier divide numerical features to create decision tree. Petal length feature has following properties: ...
0
votes
0answers
7 views

Recursive Feature Engineering with Categorical and Continuous Variables

I'm trying to determine what to do with categorical feature when using recursive feature selection. I've looked around this forum and elsewhere and most discussions focus on one-hot-encoded features ...
0
votes
1answer
13 views

Comparison of categorical variables with 3+ levels between two groups

Apologies if this is a simple question, but I can't seem to find an answer. I'm hoping to compare two categorical variables, one with 2 levels and another with 6, summarised here: ...
0
votes
0answers
15 views

Can I treat my continuous variable as a categorical variable?

I know that there many dangers and disadvantages of treating a continuous variable as a categorical variable. However, I also read in some cases it is applicable (e.g. when the relationship is non ...
0
votes
1answer
22 views

Research papers where categorical variables were transformed via one hot encoding [closed]

Of course, many researchers have transformed categorical variables via one hot encoding in their work, but I don't find these papers. So they should not be papers that only refer to the topic of one ...
1
vote
0answers
7 views

BERT for non-textual sequence data

I'm working on a deep learning solution for classifying sequence data that isn't raw text but rather entities (which have already been extracted from the text). I am currently using word2vec-style ...
0
votes
0answers
13 views

Average of importance gain for a categorical variable

Suppose I have a set of M categorical variables, some of them with a different number of categories (for instance, var1 has five categories, var2 has three, etc). I train an XGBoost model on a numeric ...
0
votes
0answers
14 views

Categorical variables

i have a panel data set. my dependent variable is total costs. and almost all of my independent variables are Categorical variables. like age is "old","new" now i have some questions. 1-should i use ...
0
votes
0answers
24 views

Ordinal regression, categorical variables, and “step” function

I am doing an ordinal regression analysis using "polr" function. I got a result of the regression analysis and continued to use "step" function to find the final prediction model. As all my variables ...
0
votes
0answers
22 views

Time series predictions involving categorical output

I have a dataset that contains $y(t)$ and $\mathbf{x}(t)$, where $t = 1, 2, 3, ..., 10000$, $\mathbf{x}(t_i)$ is a 5-dimensional vector of real values and $y(t_i)$ is a categorical variable (of no ...
0
votes
0answers
10 views

Likert Scale / Chi Squared Test / Pre-Post Design Question

Super junior stats person here. I have a dataset I am looking to analyze properly. I have administered 2 surveys, one pre and one post. They may or may not be the same participants (was distributed ...
0
votes
0answers
20 views

Remarkable behavior of logistic regression solvers

I wonder what causes some strange behavior of LogisticRegression's solvers in the following model: For some reason, all of them except liblinear predict only 0s. Their loglosses are equivalent, ...
0
votes
0answers
17 views

best subset of moderators for meta-analysis in R

I have a large number of "categorical" moderators (35 moderators). I am planning to use the best subset of these moderators that can maximally explain the variation in my 257 correlated effect sizes ...
0
votes
3answers
42 views

How can I check if nominal and ordinal data is normally distributed (for z-test of proportions)

This section deals with concepts and procedures for testing inferences about proportions that involve the normal distribution. Following a discussion of the concepts related to tests of ...
3
votes
1answer
44 views

Testing differences in variance between groups

I have a hypothesis that a particular intervention/treatment will cause more variation in participant responses to a particular question. The intervention variable is categorical, with five different ...
0
votes
0answers
8 views

Measuring distribution/concentration across categories [duplicate]

i'm trying to represent concentration/distribution across a set of categories. Specifically these are job types, e.g. tourism, manufacturing, transport, education. Let's say there are 10 job types ...
0
votes
0answers
5 views

Best way to establish effect sizes in high-dimensional model with mixed data

I have 4 categorical variables, one is by state so it has 50 possible values. I also have 3 continuously distributed values. I'm trying to predict a continuous variable. I'm using a random forest for ...
0
votes
1answer
25 views

Does it make a differences to a prediction model if a factor is ordered or not?

I want to build a prediction model where one predictor variable is a score of roman numeral I, II, III, and IV. I am using R and I currently store this feature as factor. This, however, is not ...
2
votes
1answer
23 views

IPTWs for Multi-category treatment, how to handle a multi-category mediator

I have a multi-category treatment for which selection is adjusted for using IPTWs. My concern regards a multi-category mediator that occurs post-treatment, but which also co-occurs with the outcome. ...
1
vote
1answer
35 views

Splitting dataset with respect to categorical variable

Assume that we have a data set with some features and a goal is to perform a classification. Let's assume that a dataset is moderately large compare to the total number of features. Next, assume that ...
0
votes
0answers
25 views

What would be a good machine learning method for this case of music generation?

I want to generate musical compositions via machine learning and I’d like to know what statistical techniques could work. There are existing approaches that generate music of general interest, but ...
1
vote
3answers
45 views

Interpreting categorical variables in regression

When running a regression with a categorical independent variable, we get results for each level of the variable except for the base, which we can choose. Now I've always had a hard time on how to ...
1
vote
1answer
35 views

Effect of omitting interaction term on OLS estimators

Say we know that $Y$ follows the model $$Y = \beta_0 + \beta_1X_1 + \beta_2X_2+\beta_3X_1X_2+\epsilon$$ Suppose that $X_1$ is a categorical binary predictor, while $X_2$ is a continuous predictor that ...
1
vote
0answers
18 views

Slight confusion on independent vs dependent samples

If I have two patient populations with cancer and I'm comparing cancer sizes, so say cancer size 1, 2 and 3 in an ordered fashion. Would these samples be dependent or independent? In one way, these ...
0
votes
0answers
11 views

Improving a logistic regression model

I have a logistic regression model with one categorical predictor (four levels). The model does not fit well; I've used a Pearson's Chi Square Test and McFaddens Pseudo R squared to evaluate. I am ...
0
votes
0answers
9 views

Should I use contrast coding( or any specific coding) for factor predictor (condition) with 2 levels : “treatment” & “Control” in brms & lme4?

This is for hypothesis testing where my hypothesis states that the dependent variable has a higher value in the treatment condition. I'm doing it both in brms & lme4 to do a comparative study ...
0
votes
0answers
23 views

Categorical variables in regression model

I have a simple question that I cannot figure out. When specifying a regression model with categorical variables as an independent variable, it's possible to perform the coding in two ways. For a ...
0
votes
1answer
19 views

Chi square for presence/absence data?

Is it possible to do this with chi square? I have two groups of mice, one with a mutation in a gene and one without. I have analysed the presence/absence of organs in each group, and found that all ...
0
votes
0answers
23 views

Specify correct answer in Nominal Response Model (IRT)

Unlike in the dichotomous model, it seems that nominal models are oblivious to which choice is the correct answer at any given item. However, I'd like to make sure that, as $theta\to\infty$, the ...
2
votes
1answer
70 views

Finding trends in ordinal time series data

I am looking at patient data with clinical scores for each that run from zero to 6 (integers, where zero is best and scoring 6 on symptoms is worst). There are follow up scores on each patient (at ...
1
vote
1answer
41 views

What is the relationship between a quadratic model and categorical model?

Using logistic explore the association between lung reactivity and risk of chronic respiratory disease. The dataset contains information on a combined measure of lung function exposure respcat ...
0
votes
0answers
7 views

categorical variable based on self-report scale -cut-off values - social sciences

https://pdfs.semanticscholar.org/e994/335c7df90239e066203b5853fb55c3f1b498.pdf for this relationship closeness inventory, on the very last page of the article PDF, in appendix B: it's a 1 to 10 scale ...
0
votes
0answers
24 views

Which test is suitable in below situation?

I want to calculate the correlation of two continuous variables, unfortunately both of them are not normally distributed. (by using Shapiro-Wilk test) There are two categorical confounding variables ...
2
votes
1answer
16 views

Exploring relationships between 88 dichotomous variables?

A little background, The dataset I've been given (to hopefully analyze) where a group of people have coded 288 music videos for the presence or absence of 88 different variables (e.g. band members ...
0
votes
2answers
21 views

Information about independent variables in poisson regression

Can independent variables in Poisson model, Negative binomial model and Hurdles model be categorical ?
1
vote
0answers
31 views

Differences between cumulative link models (ordinal) and multinom (nnet) for fitting multinomial data

I'm trying to understand cumulative link models and how they differ from multinom models in R. Here's a simple example of a multinom model and plot output using the nnet package: ...
1
vote
1answer
26 views

Logit model for hundres of items - can and should I use the items as a category variable?

I am in the early phase of a new project about looking at multiple factors that potentially influence the probability that an item fails quality inspection. I am interested in seeing whether each ...
0
votes
1answer
16 views

Correlation of factors in a variable

I have a categorical variable column that looks like this ID Item ------- 1 Apple 1 Orange 2 Apple 2 Pear 2 Orange 3 Apple I converted it to a wide ...
1
vote
0answers
48 views

Performing and interpreting a logistic regression using ordered variables in R

I'm currently working on my first larger project with self-collected data and only few guidelines. My dataset contains 29 variables, all of which are categorical and most of which are ordered (with 2 ...
1
vote
1answer
20 views

Categorical sampling without instantiating probability vector

I want to sample from a discrete distribution with probability vector $p \in \mathbb R^n$, where $n$ is large. Suppose that $p_i = f_i / Z$, where $Z$ is a normalization constant. I can compute the ...
1
vote
0answers
24 views

Do we use weighted or unweighted data when doing categorical data analysis?

Im quite confuse if I should use a weighted or unweighted survey data when doing categorical data analysis such as Chi-square, G2, concordant or discordant analysis, etc. Basically, these analyses ...
0
votes
0answers
13 views

Appropriate statistical test

For the data in image can anyone please suggest the right statistical test. Want to test if brand preference depends on income level. The percentages adds upto 100% row wise meaning the values in a ...
1
vote
0answers
16 views

How to impute a categorical variable with MICE but prevent it from taking some values?

I have a categorical variable, var1 , that can take on values of W, B, A, M, N or P. There are some NAs that I want to impute using the mice package in R, but I know that the missing values cannot be "...
0
votes
0answers
26 views

Another solution than McNemar test for bilateral asymmetry on binary data?

Let's say I studied the shoulders of 10 individuals, and I scored the presence/absence of a criteria (ex: arthrosis, presence=0;absence=1) on the left side and the right side. I need to test the ...
0
votes
1answer
9 views

Can you use k-modes on mixed types?

This question is for using clustering for EDA in a structured dataset. My understanding is that k-means does not do well with categorical data because it cannot interpret means of non-numerical data. ...