Skip to main content

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
-1 votes
0 answers
8 views

categorical independent variables [closed]

I am conducting a retrospective study and have some categorical independent variables, and my outcome variable is also categorical. I am wondering if the chi-square test with multiple categorical ...
Rafael Biondo's user avatar
1 vote
0 answers
46 views

How to find the expected value of $p_k$ in multinomial regression

Given a multinomial regression the probability of a certain class $k$ is a function of predictors. How would we find analytically the expected value of $p_k$ given we know the distribution of ${\bf X}...
Vefeagins's user avatar
  • 558
1 vote
0 answers
18 views

What type of test should I use for paired categorical data?

Somewhat similar questions have been asked here and here, but none of the other answers are really applicable in my case. I have a group of people, where in Year 1 everybody is sick. Here I have only ...
sdlaa's user avatar
  • 11
1 vote
1 answer
22 views

Why the contribution of a categorical value in SHAP trained on Catboost differs from observation to observation

Context Let's imagine I am interested in predicting sepal length in the iris dataset using catboost. Objective My main objective is understanding the effect of each categorical value for ...
Carles S's user avatar
  • 138
1 vote
0 answers
22 views

Modeling for a data set that has different number of factors for each row (not binomial) [closed]

The modeling issue I'm having is that the categorical variable for each row has different number of factors. If I can reshape the data by products (a,b,c,.....~cost, hoursum, numPod, numDate), so that ...
rocknRrr's user avatar
  • 121
3 votes
1 answer
66 views

Factor-smooth interactions in generalized additive models

I have a very simple question regarding the continous factor-smooth interactions implement in the mgcv package in R: https://stat.ethz.ch/R-manual/R-patched/library/mgcv/html/factor.smooth.html ...
Fuffi's user avatar
  • 31
0 votes
0 answers
31 views

Correct test for regression with more than two factor levels?

Is it correct to use a "post hoc test" (e.g. a Tukey test) to analyse differences among factor levels in a linear regression or is there another method that is preferred? In my case, I have ...
Picapica's user avatar
  • 493
3 votes
1 answer
59 views

Testing dependence of two categorical variables with data separated by test subject

This relates to a real-world experiment I'm working on. Let's say in my experiment, test subjects look at pictures of sunglasses that are either red or blue, and then label them "cool" or &...
Lysanderoth's user avatar
1 vote
1 answer
14 views

Handling Composite Variables in Latent Class Analysis

I am working with secondary survey data that includes 13 dichotomous variables. According to my theoretical model, I need to group these variables into composite variables. However, I understand that ...
Irina's user avatar
  • 11
2 votes
1 answer
29 views

Exponential Regression dependent variable with dummy variables or numerical average of each category?

My dataset includes toxin concentrations (continuous, dependent variable) for different size classes (5mm increments) of juvenile fish (categorical, independent variable). The smallest size class is ...
96jtaylor's user avatar
1 vote
2 answers
60 views

What is the difference between a) multilevel modelling and b) adding a categorical IV to a multiple regression?

The examples of multilevel modelling I have seen are equivalent to treating the group as an extra categorical IV in a multiple regression. For example, if children are grouped into N classes, you ...
Mohan's user avatar
  • 939
3 votes
1 answer
144 views

Are dichotomous categorical variables technically interval/continuous measures?

In my university statistics book it says "Dichotomous categorical variables are easily handled in MRA. This is because they are by definition, an interval (continuous) measure.". However I ...
izzi3880's user avatar
0 votes
0 answers
25 views

Statistical test to show differences between two categorical datasets

I have two categorical datasets that I would like to compare against each other, but I'm not exactly sure which test to choose and how to go about it. Both datasets show the number of cases for 8 ...
lgu93's user avatar
  • 1
2 votes
1 answer
41 views

How to model the interaction between two continuous variables and two factors using gams with mgcv? [closed]

I was wondering how I could model the effect of two continuous variables X1 and X2 and two factors F1 and F2 and their interaction on a outcome Y using gams. What I primarily want to know is (in ...
Boussens-Dumon Grégoire's user avatar
0 votes
0 answers
7 views

Appropriate datatype for cyclical periods (like days of the week and seasons) [duplicate]

I am trying to figure out the best way to encode cyclical time indicators like days of the week and seasons. (Other examples would be day of the month and week of the year, but I'll try to keep this ...
Tripartio's user avatar
  • 2,266
0 votes
0 answers
13 views

Is it possible to calculate inter-rater reliability for one item rated by multiple raters with weights?

I have a survey with a number of statements that had participants categorizing the statements into one of the 4 options they were provided. The participants were then asked to rate the confidence of ...
Jay Jakka's user avatar
0 votes
0 answers
14 views

Confusion about the chi-squared test to compare 3 proportions

I have run an within-subjects experiment in which each participants answers to 3 binary questions (A,B and C). This means that all participants answered every questions. I want to compare the ...
MiKiDe's user avatar
  • 113
3 votes
1 answer
44 views

How do you model the two-way interactions between a continuous variable and two factors but not the three-way interaction with GAMs?

For the example, let's suppose I'm trying to model the level of activity of some frogs depending on a continuous variable (water temperature) and two factors : their sex (M or F) and the period of the ...
Boussens-Dumon Grégoire's user avatar
0 votes
0 answers
30 views

Can I model the interaction between a continuous variable and two factors separately for each factor?

I'm wondering if I can model the effect of the interaction between a continuous variable and two factors in a model without including the three-way interaction between the two factors. Let's imagine I ...
Boussens-Dumon Grégoire's user avatar
0 votes
0 answers
14 views

Classification model for categorical data, highly imbalanced

I am trying to create a classification model for birth defect data. The goal is to determine which of the paternal variables are most associated with the top 5 birth defects. The target variable '...
Farmurey's user avatar
1 vote
0 answers
22 views

chi-square test of independence - adjusted residuals interpretation [closed]

If you have a large contingency table (or variables with a lot of categories), should the relationship with the highest adjusted residual be interpreted as the combo that is informing the sig. chi-...
stephan_phd's user avatar
0 votes
0 answers
10 views

What if using Friedman test on dependent variable that is nominal data?

I have a group of 30 participants who did a test for three times. Each time, The independent variable was changed and the participants reported their answers (dependent variable). The independent ...
adaaagiooo's user avatar
1 vote
0 answers
71 views

How to compare different clustering approaches of categorical data using different similarity measures?

I am working on a project to cluster a dataset containing categorical features. I have tried applying different clustering algorithms like K-modes and HDBSCAN, each using different distance/similarity ...
Maxolf's user avatar
  • 13
0 votes
0 answers
15 views

Mixed Logit - Identification of beta/sigma

Since MXL is invariant to scale (utility is ordinal), we only identify $\beta/\sigma$, not $\beta$ or $\sigma$ independently. But is it possible to use the estimated $\hat{\sigma}$ from the regression ...
Adam Samson's user avatar
1 vote
1 answer
32 views

Statistical test of increase between groups in two time periods (categorial data)

I would like to check if percentage change between the groups and time for binominal variable is significantly different. What test to use? In Group A (n = 1000) in t0 we had a 10% share that ...
AAAA's user avatar
  • 143
7 votes
1 answer
117 views

What is the best statistical test to compare the survey Response rate for a control and treatment group?

We run a survey and want to run a controlled test on a sample of the data. The measure we are trying to improve is response rate. Our research question is: “does sending out more invites to ...
user411368's user avatar
2 votes
0 answers
34 views

Correct regression to use for longitudinal pest survey between two groups across multiple sites

THE DATA: We have 3 sites with a total of 36 plants growing in them: each site contains 12 plants (6 belonging to spp1 and 6 belonging to spp2). The size and geolocation of each plant is known. Each ...
theforestecologist's user avatar
1 vote
1 answer
58 views

Linear regression on categorical variable, how to interpret the F-statistic?

I am using statsmodels to fit a regression: smf.ols(formula=change ~ C(location))` where change is a continuous variable. I have a lot of locations and some of the ...
benr's user avatar
  • 23
0 votes
1 answer
33 views

Multiple linear regression on just categorical variables? change ~ C(location)

I am trying to show that a categorical variable doesn't really affect a continuous variable. I am using statsmodel formula: sm.ols(formula=change ~ C(location)) ...
benr's user avatar
  • 23
0 votes
0 answers
23 views

Binomial logistic regression and inter-group comparison

I am interested in exploring the relationship between two categorical variables: "Ethnicity" and "Disease", each with two levels. My primary hypothesis is that individuals with &...
Erfan Naghavi's user avatar
2 votes
1 answer
39 views

Am I using the appropriate statistical comparison tests & applying them correctly to my qualitative coded data?

I am trying to determine if I am using the correct statistical tests in making comparisons & finding out if there are any statistically significant shifts of student attitudes. I have three open ...
Cassandra C's user avatar
2 votes
1 answer
38 views

Simple Regression Coefficient Formula for Categorical Variable?

For an indepdent numerical variable X the B1 coefficient is COV(X,Y)/Var(X). Since Categorical Variables don't have things like Means(from which things like COV and VAR are derived) how would it work ...
Mandem's user avatar
  • 135
1 vote
0 answers
21 views

Understanding different ways of coding categorical predictors in regression

Using this code and sample data: ...
JD93's user avatar
  • 11
2 votes
1 answer
53 views

Regression in sex differences multiple dependent variables

If I want to examine sex differences in three variables, lets say academic attainment, study motivation, and a variable that is categorical. How should can I fit these variables with OLS regression? ...
user409571's user avatar
3 votes
1 answer
119 views

Warning when using sparse categorical values with LightGBM

When training a LightGBM model with lgbm.train, I get the following warning: [LightGBM] [Warning] Met categorical feature which contains sparse values. Consider ...
DustByte's user avatar
  • 131
1 vote
1 answer
54 views

How does type II vs type III ANOVA work when there are more than two categorical predictors?

For a model with two categorical factors in the form: X = A + B Type I (used if the factors are balanced) calculates SS for each term in the model sequentially as follows: SS(A) then SS(B|A) = SS(A ...
Insect_biologist's user avatar
0 votes
0 answers
14 views

What is the standard performance metric for categorical data clustering?

I performed a categorical clustering with some selected UCI datasets. I one-hot encoded the features, then directly used Binomial Mixture Model and KModes using this one-hot encoded data. On the ...
NOT-A-CS-GUY's user avatar
3 votes
1 answer
71 views

Best Practices for Difference-in-Difference Analysis of Quasi-Experimental Repeated Cross-Sectional (Cat.) Data Different Samples per Neighborhood

I'm working with repeated cross-sectional data where each measure comes from a different sample of respondents per neighborhood. My study aims to evaluate the impact of varying police patrol levels (...
DeMelkbroer's user avatar
0 votes
0 answers
31 views

Event study using Panel data or Fixed effects

I am looking to analyse the impact (causal effect) of a conflict on firm valuation (using daily prices) for a sample of around 800 firms (I currently have this data over a sample period of around 365 ...
mek1401's user avatar
0 votes
0 answers
22 views

Interpreting R glm gamma output with interacting categorical predictors

I have a set of different gamma regressions that I ranked with AIC (with help from kind folks on CV) that show the effects of year (2019 and 2021) on "value" (an area), but I am struggling ...
ElizaBeso000's user avatar
4 votes
2 answers
269 views

Calculating odds ratios for an interaction term

Ratgrp stands for lung function (FEV1/FVC)*100 and it has two categories: 1: Lung function less than 70 2: Lung function equal and higher than 70 ...
Jonathan's user avatar
0 votes
0 answers
16 views

What's the optimal observation count per category for Machine Learning?

I'm seeking some advice or references concerning the optimal number of observations required for each category within a categorical variable, specifically for machine learning projects. To give an ...
Locolindo's user avatar
1 vote
0 answers
25 views

Test score equivalence - preparing data for Spearman correlation? [closed]

I have a somewhat theoretical question. I am trying to establish how closely scores across different language tests (IELTS, TOEFL, C1A, OET, DET) used in public domains match each other, given that ...
Amanda's user avatar
  • 11
3 votes
3 answers
152 views

One class never gets predicted, regardless of the model

I'm working on a classification problem from a dataset containing three classes, with proportions {"0":0.43, "1":0.25, "2":0.30}. ...
Mordechai's user avatar
2 votes
2 answers
88 views

Is a binomial logistic regression valid in this case, and how do I use it / interpret its results?

I am facing the unusual problem that my $p$ values are too good. They are so good that I must be doing something wrong, but I don't know what. I am working with natural language data from a text ...
Keelan's user avatar
  • 143
0 votes
0 answers
27 views

Is it possible to run a zero-inflated negative binomial model with complete separation? [duplicate]

I am trying to analyze how the number of events Y is influenced by three factors A (4 levels), B (2 levels) and C (2 levels) and the interactions between the three. Initially trying a poisson ...
Insect_biologist's user avatar
0 votes
0 answers
25 views

Assessing Impact of Categorical Features in Classification with Multiple Models

I am working on a binary classification problem with a limited dataset (50 observations), aiming to understand the influence of categorical features on the target variable. I'm exploring several ...
Mamad Fasih's user avatar
0 votes
0 answers
29 views

Opinion about conversion of factor to numeric variable during model development using caret package

caret package automatically converts factor variables to one-hot encoding. We can also convert the factor variable to a numeric variable before training any model. ...
UseR10085's user avatar
  • 107
4 votes
1 answer
349 views

Setting priors for categorical variables in bayesian multilevel model analysis with BRMS package (repost)

I am reposting the same question that I made on Stack Overflow. I am new with Bayesian analysis methods and I am still struggling understanding some concepts regarding priors. I am running a model ...
Dea's user avatar
  • 41
0 votes
0 answers
29 views

Correspondence analysis

I have a question. I have the following categorical data from an open text diary study: Individuals reported emotions in different situations. Each individual reported their emotions in 3 to 5 ...
Michi19's user avatar

1
2 3 4 5
72