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
0 answers
15 views

Automatic selection of contrasts for categorical variables in R

I am taking a course in predictive modeling for which the professor does all demoes in JMP. I am more comfortable in R and am working on replicating everything I can there. So far so good except ...
0 votes
0 answers
6 views

Can I average a value over a category where there many be elements that count to multiple categories?

I'm trying to generate an average number of visits that interact with a specific category, but a visit may count toward multiple categories. Is it valid to still provide an average? Here's a general ...
7 votes
3 answers
337 views

Dichotomising vs keeping categories in regression

I'm doing an analysis to see if having children is associated with treatment outcome. The children variable is categorical and takes values 0-7. When I dichotomise it into 'children' and 'no children',...
  • 105
5 votes
2 answers
130 views

Analyse categorial data where best outcome is middle level

I have a dataset where the outcome variable is the result of a blood test that ranges from 10 to 40. A person is healthy if the result is between 20 and 30. Under 20 and over 30 are equally bad ...
0 votes
0 answers
17 views

How to model category-valued panel data with fixed effects?

If we include fixed effects in a panel data logistic regression, we break the typical nice consistency property of maximum likelihood estimation. Consequently, it has been proposed to use a linear ...
  • 43.5k
0 votes
0 answers
16 views

Why do I get so many NA's in my Cox proportional hazards model summary output?

I have tried to run the following Cox proportional hazards model where the dependent variable is Latency (time to a particular event), Censor denotes whether the event happened or not (1 = Yes, 0 = No)...
0 votes
0 answers
10 views

How to calculate the sample size for the development of a new clinical test?

How to calculate the appropriate sample size for the development of a new clinical test? The test would either be a quantitative test if the accuracy is good enough (i.e., test would predict a ...
  • 55
2 votes
1 answer
35 views

Why does my textbook say this is not a frequency distribution / not categorical data? It looks like one to me

I am reading an intro to statistics textbook, and they were telling us about pie charts. They were saying that pie charts can be used for categorical data sets. But then they said that they can be ...
  • 21
1 vote
1 answer
17 views

Use Mutual Information Feature Selection For Categorical Feature

I have a dataset in which there are Features of both float and object type . I want to apply feature selection On this dataset in such a way that fisrt Find Mutual Information Score of all the ...
1 vote
1 answer
34 views

How to compare two non-dichotomous categorical variables?

I have a dataset of individuals with one categorical variable of age groups (18-24, 25-35, etc), and another will illness category (7 values in total). If I graph the data I can see obviously much ...
1 vote
0 answers
7 views

Fractional factorial design with mixed categorical and numerical variables analysis for more than two levels

I have an experiment setup that consists of multiple continuous and multiple categorical variables. Right now, I am just using two levels for the categorical variables, allowing me to encode them as -...
  • 111
-1 votes
1 answer
40 views

What kind of test do I need to perform for categorical variable with negative values? [closed]

Suppose I have two categorical variables: 1. Person, and 2. Color of clothes. Each person will wear different color of clothes and will be asked to walk along a line back and forth (like random walk) ...
  • 141
0 votes
0 answers
20 views

Chi-squared test for joint independence of multi-way contingency table

I need to understand if there exists a version of the chi-square test of independence (typically used to test independence of two variables) for a multi-way table. If I have $n$ units observed on $p$ ...
  • 57
0 votes
0 answers
20 views

LASSO regression for categorical variables

Suppose there are several categorical variables included in the LASSO regression. For a categorical variable with more than two factors, it is mandatory to create a dummy table. For example, the ...
0 votes
0 answers
39 views

Handling Imbalance Categorical Value in A Dataframe Column

I have a dataframe contains id, gender, and class, for example: ...
user avatar
4 votes
3 answers
149 views

Visualizing Categorical Response Data

I have a dataset that contains the "weight", the "gender" and if someone has "asthma" or not. I am interested in learning about ways to visualize the proportion of people ...
  • 6,872
0 votes
0 answers
4 views

Decision tree for dispersion measures: stuggling with categorical data

I am trying to create a decision tree to summarize dispersion measures depending on the nature of the variable. For categorical data, I have read that dispersion measures could be applied and I have ...
  • 75
0 votes
1 answer
21 views

Is it valid to calculate the difference between two odd ratios within the levels of a categorial variable in an ordinal logistic model?

Supose you have an ordinal logistic model, with a dependent variable with 6 categories, being 6 the highest and 1 the reference. I have one independent categorial variable, that I would like to ...
  • 173
1 vote
1 answer
38 views

Factorial regression without significant interaction - can I consider contrasts significant?

First, I'm really sorry if this is a duplicate, I just couldn't find a definite answer. I'm not used to analyzing categorical variables so I'm having trouble with something that is probably very basic....
  • 456
1 vote
1 answer
25 views

Multinomial/Categorical models with a variable number of outcomes

Is it possible to implement a multinomial/categorical model where the number of categories itself is variable? For example, say I have two surveys with the following questions/responses: What ice ...
0 votes
0 answers
17 views

linear mixed model: 2 fixed effects in a crossed(?) design? lmer

We have a continuous variable intensity as a dependent variable. Three categorical variables: material(A,B,C,D), group(1,2,3,4,5,6,...), patient_id. patient_id is supposed to be a random effect. We ...
0 votes
0 answers
9 views

Continuous and discrete input data types for neural network

I have a dataset where the input is comprised from both continuous and discrete variables: ...
1 vote
1 answer
15 views

Are the assumptions of collinearity and no influential observations relevant when all predictor (independent) variables are categorical?

In order to run a simple linear model (e.g. using lm() function in R) I am under the impression that the following assumptions must be met: Normality of residuals Homoscedasticity No collinearity (...
1 vote
0 answers
18 views

Should low frequency categories be eliminated or amalgamated in multiple correspondence analysis?

This is just a theory question so no code or example is required I think. I want to know if there is a rule of thumb for what constitutes low frequency in MCA? Should the variable be eliminated? Could ...
  • 35
1 vote
0 answers
11 views

Looking for associations between nominal and non-parametric continuous data

I'm a first-year BSc Biology student working on my end-of-module stats project, so that's the expected level of my work. I need to find associations between hindlimb length and frog locomotor modes (e....
  • 11
0 votes
0 answers
5 views

Comparing demographics between 3 groups

I'd like to check on differences between 3 diagnostic categories in the demographics (for instance if one disorder is more prevalent in females or males), so I'd like to make comparisons on nominal &...
0 votes
1 answer
33 views

Why does my linear mixed model not output the random slopes for the model?

I have this dataframe: subject delta day_of_week A 30 0 C -20 3 Y -2 0 S 10 4 A -5 1 And I am trying to train a linear mixed model using the statsmodel library with this code: ...
1 vote
0 answers
15 views

What would be the most appropriate analysis to compare repeated measures, multiple proportions of 100% across time?

Let's say you have a person who wishes to increase their running endurance. They complete three runs, where the proportion of time (as a %) they are running, walking, and resting are logged. Is there ...
1 vote
0 answers
27 views

What statistical test should I use when comparing answers from a questionnaire between baseline and follow-up?

This is my first question, so I am sorry if there is some missing information. I am unsure what statistical test I should use when I want to see if there is a difference from baseline to follow-up (...
1 vote
1 answer
20 views

How to encode categorical variable with multiple categories per datapoint?

Consider this question on a survey: What desserts have you eaten? Apple pie Banana pudding Coconut cake Doughnut holes The user can pick as many of the options as they like. How would one encode ...
  • 137
0 votes
0 answers
21 views

Residuals vs. Predictor Plot for categorical predictor

I am trying to use Residuals vs. Predictor Plot to evaluate whether to add a new categorical feature (with 2 levels) to my logistic regression. I found this useful page about how to use Residuals vs. ...
0 votes
0 answers
32 views

how to improve logistic regression model in python

I have 1 million raw data points, and I dropped 2 independent variable because the have over 80% missing value. All my variables are categorical except for "age" which I scaled between -1 ...
  • 11
0 votes
1 answer
78 views

Understanding the process of tweaking contrasts in linear model fitting to show all levels

The accepted answer to this question on SO accomplishes exactly what I need: Comparing all factor levels to the grand mean: can I tweak contrasts in linear model fitting to show all levels? However, I ...
  • 351
0 votes
0 answers
29 views

Logistic regression : contrast vs. changing reference group

I have a dataset with a dependent binary variable and one independent variable (with five categories). When applying logistic regression I have a model that calculates the coefficients of each of ...
  • 243
1 vote
1 answer
57 views

Boxplots: valid method for visualizing collinearity?

I recently heard one can detect collinearity between a factor (Species) and a continuous covariate (TL) simply by making a boxplot. If the plots don't overlap, there is evidence of collinearity. I'm ...
  • 871
1 vote
0 answers
12 views

How to compare control group to treatment groups and also compare treatment groups to each other? Binary Data only

In my survey participants randomly got assigned to one of the four groups and had to choose between two options for three fictional purchases. The treatment groups contain the same intervention but ...
user avatar
3 votes
1 answer
88 views

How are models equations defined in this paper?

In this paper, The Mediating Role of Perceived Value: Team Identification and Purchase Intention of Team-Licensed Apparel, three different Models (A,B and C respectively) are analyzed based on a ...
  • 218
1 vote
0 answers
40 views

How to check if there is a linear relationship between a categorical feature and a continuous feature?

The target feature in my data is numeric, continuous. I have several predictive features, some of them are categorical. Now in order to train a linear regression model, I've used dummy variables and ...
  • 423
1 vote
0 answers
20 views

investigating and testing temporally overlapping data points in R

This is a two-part question that first asks how to query some data I have in R, and secondly, asks what might be the appropriate statistical operations to test any perceived relationships between ...
  • 11
0 votes
0 answers
12 views

What is the best way to identify demographic characteristics from within pooled survey data?

I have conducted a survey looking at individual exercise habits and their preferences regarding technology when measuring exercise and providing feedback. I am in the process of analysing the data ...
  • 1
1 vote
0 answers
34 views

Imputing with MissForest, should I keep categorical variables with no missing data in inputs

I have a dataset with missing values that I'm trying to impute thanks to MissForest algorithm using python missingpy library. To my understanding, I should keep in the inputs even columns with no ...
  • 11
0 votes
0 answers
13 views

Difference between stratifying and categorizing a variable?

What's the difference between stratifying a variable within a model vs making a category variable out of it? Does the difference lie in that stratification affects how all the other variables are ...
  • 391
0 votes
0 answers
21 views

Do I have to check if continuous turned categorical features are linear? [duplicate]

I tried applying splines to my model and that increased the p-values for all other variables in my model. Instead, I chose to categorize my continuous variable, ...
  • 391
1 vote
1 answer
24 views

General Linear Models, categorical data, intercept and reference class

We were studying linear regression: $$Y = \beta_0 + \sum_i \beta_ix_i + \varepsilon.$$ We were then doing hypothesis tests: $$H_0\text{:}\; C\beta=0 \\H_1\text{:}\;C\beta \neq0.$$ Under the ...
0 votes
0 answers
26 views

Loss function for autoencoder on categorical data

I have some categorical variables that can take values {a,b,c}. I have a dataset of sequences of such variables E.g. x=[ (a,b,b), (b,c,a)...] I would like to apply ...
0 votes
0 answers
10 views

How do I change the model specification and conduct sensitivity analysis in mice's imputation procedure for categorical variable?

I am interested in conducting sensitivity analysis of multiple imputation by mice on a binary categorical variable. mice used logistic regression to conduct imputation. How do I modify the parameter ...
  • 1,315
1 vote
0 answers
24 views

Sample size calculation for non-inferiority prospective observational study with paired nominal data?

I'm doing a diagnostic observational study, where doctors in two different fields (emergency physicians vs radiologists) try to diagnose same patient (paired sample). The question we are trying to ...
3 votes
1 answer
87 views

Does it make sense to convert a single dummy variable into a factor?

I have an R lecture script infront of me, where we are using logistic regression to try to predict the probability that an observation belongs to the target class (e.g. y_i = 1) or not (e.g. y_i = 0). ...
  • 31
0 votes
1 answer
23 views

Intercept and indepenent variable's t-value is 0

Unfortunately for privacy reasons I cannot disclose the original data <Edited: snippets of the original data below>, but I'm running a regression model like this on R. ...
0 votes
0 answers
24 views

Statistical test for a difference in two proportions drawn from a single population

I'm looking for a statistical test to assess the difference between two proportions drawn from a single population. I do not have paired or repeated measures here. My data consists of about 10,000 ...

1
2 3 4 5
70