Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
58 views

Data categorization

I have categorized my education dataset for the analysis below. However, I have one occurrence of a respondent who attended a Missionary school that I do not know its level and I am unsure where to ...
Amelia Nicodemus's user avatar
5 votes
2 answers
109 views

How to calculate the reference level interaction in regression in R?

I am very confused on calculating the reference level interaction in regression in R. Here is the sample code: ...
doraemon's user avatar
  • 364
2 votes
0 answers
45 views

Dropped variable in regression output in R

I am running a linear regression trying to predict an outcome y that is a numeric, continuous variable based on a variable with three levels (A,B,C) and three more variables that represent the ...
user avatar
4 votes
1 answer
86 views

Creating a dummy variable when the continuous variable is equal to 0

I'm actually trying to find the best explanatory variables in order to estimate the probability of deafult of the counterparties of my portfolio. After defined the Long List of variables, I'm testing ...
karl's user avatar
  • 41
2 votes
1 answer
49 views

Dummy encoding for the multinomial response variable

I am reading about multinomial response models from the book Multivariate Statistical Modelling Based on Generalized Linear Models by Fahrmeir and Tutz. I am trying to understand the following ...
medium-dimensional's user avatar
3 votes
1 answer
109 views

Sum to zero contrast that makes it easy to express equal uncertainty about each factor level

How do I need to set-up a sum-to-zero contrast so that it is easy to express equal uncertainty about each factor level? E.g. when I go with the default offered by R such as: ...
Björn's user avatar
  • 35.3k
2 votes
2 answers
94 views

Recreate `lm` Categorical Regression

Consider the code, which contains regression using lm of two categorical and one continuous variables without interaction using data from the correct model: ...
温泽海's user avatar
  • 639
3 votes
1 answer
284 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
0 votes
0 answers
27 views

Ordinal vs one-hot encoding when all features are categorical

Dealing with categorical data is not as straightforward as dealing with continuous data, since all ML algorithms expect their input in a numeric format. As such, when our features are categorical in ...
Antonios Sarikas's user avatar
0 votes
1 answer
35 views

Problems with Dummy Categorical Variable Coding in Logistic Regression [duplicate]

I am using SPSS 26. Whenever I conduct a binary logistic regression, the first group of the categorical independent variable does not get dummy coded, and thus, does not get included in the model. In ...
Eric's user avatar
  • 1
4 votes
2 answers
280 views

Interpretation of dummy-coded variable

I have a dummy variable, with 1 meaning the years in which an historical event took place and 0 meaning the years in which it didn't take place. I used 0 as the reference category. When the regression ...
brian's user avatar
  • 75
4 votes
2 answers
398 views

Interpreting when a regression coefficient is significant

Consider the following regression model: $y_i=\beta_1+\beta_2x_{i,2}+\beta_3x_{i,3}+\beta_4x_{i,2}x_{i,3}+\epsilon_i,$ where $\epsilon_i\sim N(0,\sigma^2).$ Here, $x_2$ is binary variable $$X_2 = \...
user232597's user avatar
0 votes
0 answers
51 views

Multiple Dependent Variables, One Independent - with dummy variables

I am trying to run regression models and don't know what type of regression to be running. I have one independent variable (binary variable) and 8 dependent variables (3 discrete, 3 categorical, 2 ...
Margot's user avatar
  • 1
3 votes
1 answer
87 views

What is the connection between lift and logistic regression?

I have noticed that there is an interesting connection between two (apparently different) measures. I am under a market basket analysis framework (aka frequent itemset mining, both are common names) , ...
Oscar Flores's user avatar
0 votes
3 answers
1k views

How to choose reference category of predictors in logistic regression? [duplicate]

I am struggling to decide which reference category I should define in my logistic regression model. When I define "mandatory school" as a reference in the variable education the results seem ...
Gustav's user avatar
  • 127
0 votes
0 answers
17 views

Encode & normalize features limited in range before or after split

I want to train a classifier on music data which contains a limited set of features which are all constrained in range: ...
GGG's user avatar
  • 1
16 votes
4 answers
3k views

Why do we need so many dummy variables in a regression with categorical predictor? Why not use binary encoding instead of one-hot encoding?

If we have $k$ categories of a categorical variable, why do we need $k-1$ dummy variables? For example, if there are 8 categories, why don't we code them as ...
Vika's user avatar
  • 351
0 votes
1 answer
57 views

Indicator variables/treatment variables as an independent variable?

Can a dummy variable or treatment variable be an independent variable? My independent variable take the value 1 if a flood occurs in a specific country in a specific year and 0 if no flood happens. ...
zeinab hassano's user avatar
4 votes
2 answers
125 views

Interpreting main effects with dummy coded and continuous predictors in regression

I have a logistic regression predicting probability of a 'yes' response given 'condition' (A,B,C,D; dummy coded, with 'A' as the reference level). This will produce estimates for the following: ...
SilvaC's user avatar
  • 542
2 votes
1 answer
85 views

Regression with single-observation dummies: F-test under heteroskedasticity

I have a linear regression model with an intercept and a few dummy variables. Each of the dummies indicate a single observation, so the fit is perfect for these observations. Having fit the model, the ...
Richard Hardy's user avatar
0 votes
0 answers
38 views

Normalizing the embedding space of an encoder language model with respect to categorical data

Suppose we have a tree/hierarchy of categories (e.g. categories of products in an e-commerce website), each node being assigned a title. Assume that the title of each node is semantically accurate, ...
mtcicero's user avatar
  • 123
6 votes
1 answer
91 views

How to identify parameters to test asymmetric effect in a structural model

I am estimating an likelihood function (a structural model). A part of the likelihood function is that $$ p_t=p_{t-1}k_1+x_t(1-k_1) \quad if \ x_t=1 $$ $$ p_t=p_{t-1}k_2+x_t(1-k_2) \quad if \ x_t=0 $$ ...
jasmine's user avatar
  • 357
1 vote
1 answer
192 views

Small sample in categorical explanatory variable vs overall sample size

In a statistical model e.g. regression, we have to ensure the sample size is sufficient to estimate a given number of parameters. Rules of thumb e.g. n=10 per parameter, or a power analysis, will ...
user167591's user avatar
1 vote
2 answers
87 views

Number of Phones in a word: Numerical or Categorical Data?

I'm trying to model a subset of the MALD dataset (language related) using Gaussian Distribution. MALD: https://link.springer.com/article/10.3758/s13428-018-1056-1 One of the variables I'm working with ...
karak87rt0's user avatar
0 votes
1 answer
49 views

logistic regression with dummy regressors

I'm considering a logistic regression of $Y$ on $X_1,...,X_K$ where $X_1,...,X_K$ are all dummy variables. I'm wondering if the MLE of such a logistic regression is statistically valid since non of $X$...
user0131's user avatar
  • 387
3 votes
1 answer
45 views

Logistic regression in R: Handling mixed numerical and categorical variables

I'm attempting to fit a logistic regression model in R and need some guidance on handling both numerical and categorical variables simultaneously, especially when looking for significant explanatory ...
kabin's user avatar
  • 131
0 votes
2 answers
60 views

OLS Residuals sum to zero for each submodel for a model with categorical variable?

I understand that in OLS regression, the sum of the residuals for the entire model must be zero. However, does this property also guarantee that the sum of residuals within each subgroup defined by a ...
Jetty's user avatar
  • 23
2 votes
1 answer
58 views

Can we have intercept in this model: mutually non-exclusive factors

Imagine we have an experiment, where each subject consumes 2 out of 3 different kinds of chocolate bars (Mars, Snickers, Bounty) and we measure blood sugar subsequently, that is, after 2 of the bars ...
GAMer's user avatar
  • 163
28 votes
3 answers
34k views

What exactly is multi-hot encoding and how is it different from one-hot?

In one-hot encoding there is one bit reserved for each word we desire to encode. How is multi-hot encoding different from one-hot? In what scenarios would it make sense to use it over one-hot?
Josh's user avatar
  • 4,598
4 votes
1 answer
278 views

Should I remove the intercept when I have one dummy variable that covers all the categories in a categorical variable?

I have a categorical variable that has $4$ categories, and I have two dummy variables, $x_1$ and $x_2$, that cover this categorical variable. The $x_1$ variable has values of only $1$ without any ...
user400487's user avatar
2 votes
1 answer
7k views

How to use categorical features in lightGBM? [closed]

I am working on an attrition dataset which has a large number of categorical parameters. Each categorical parameter has a high cardinality, so one-hot encoding them is out of question. I was looking ...
Ashish Samant's user avatar
3 votes
1 answer
137 views

Dummy Variable Trap & Interaction Term?

Suppose we create a dummy variable male (1=male, 0=female) and dummy variable female (1=female, 0=male). Does the dummy variable trap, also occur, if we include them into interaction terms: $Y_i = β_0 ...
Marlon Brando's user avatar
3 votes
2 answers
131 views

How to interpret dummy variables and interactions terms on dummy variables in a regression?

Suppose I have a linear regression form of $$ \log(Y) = \beta_0 + \beta_1X_2 + \beta_2X_3 + \beta_3X_1Z + \beta_4X_2Z + \epsilon $$ where $X_1, X_2, X_3$ are binary and $X_1$ is omitted as a reference ...
user321627's user avatar
  • 4,260
1 vote
1 answer
2k views

Interpreting Correlations with Dummy Variables

I am working through a paper about grad student "satisfaction" (as measured by a survey), and descriptive statistics are given in a table that looks like this: The "experience of ...
flevinBombastus's user avatar
2 votes
2 answers
134 views

Partial Correlation and 1 Categorical Control Variable with 3 Categories

I'm trying to calculate the partial correlation between continuous variables $X$ and $Y$ while controlling for $Z$ (a categorical variable with three possible categories). Tutorials and answered ...
Yousif's user avatar
  • 21
1 vote
1 answer
263 views

meaning of drop in OneHotEncoder

I am having a tough time as a newbie understanding the drop argument in OneHotEncoder. Does it drop the column with the non-...
heretoinfinity's user avatar
1 vote
2 answers
62 views

Interpretation dummy variables Cox PH model

I'm curious about interpreting the coefficients of dummy variables within a Cox Proportional Hazards (PH) model. Consider a scenario where I have a sample comprising both male and female patients, and ...
John's user avatar
  • 363
1 vote
0 answers
30 views

Calculating Expectation using the Linearity of Expectation law and sum of indicator random variables

I'm attempting to complete the problem sets for the Stanford CS109 Statistics course from 2021 as I follow along with the lectures. I'm stuck on a particular problem in one of these problem sets. I ...
fragorl's user avatar
  • 111
1 vote
1 answer
718 views

Dummy variable as both dependent and independent variable

I'm trying to replicate NBER's business cycle dating which consists of a binary dummy variable with 0 = expansion, 1 = recession. The way I've done this is by taking the 6 underlying economic ...
Statbeginner1234's user avatar
2 votes
1 answer
454 views

When I change my reference level on my GLMER in R, why do the p-values change and why don't the estimates add up? Emmeans solution in answer

I am new to this. My study has three conditions (between subjects - low coordination, high coordination, high coordination with ostensive cues) and three repetitions of a game (within subjects - Game ...
Melissa D. Perring's user avatar
0 votes
0 answers
74 views

How to get an overall P-value for a categorical variable, If I know the t-values of its dummy variables?

I am doing ANCOVA: main categorical variable for the comparison is "Street" and it contains 3 categories (Street1, Street2 and Street3). The outcome variable is social interaction time (...
Hussain's user avatar
  • 171
4 votes
3 answers
906 views

Choice of coding scheme/planned contrasts using race as a categorical variable

Generally, my default practice in regression for nominal categorical variables, including race, is to use dummy coding, with the majority/plurality level as reference. Interpretation of the model ...
Bryan Krause's user avatar
  • 1,505
0 votes
0 answers
12 views

Regression model on edge list

I would like to fit a regression in which my data is links (edges) from the network and the output is weight of each link. Income level is a node attribute and for each link two nodes are involved, so ...
Jina's user avatar
  • 1
0 votes
0 answers
28 views

Should I include a dummy variable for groups with few observations?

I am doing some analysis of US Senate races and in my regression I'm wondering if I should include a (party X state) indicator variable that essentially measures the average vote for the two major ...
Luke's user avatar
  • 1
0 votes
0 answers
22 views

Firm Fixed Effects Model dropping Sector Dummies? Potential Solution?

For my thesis, I am using panel data with stock returns and other firm data. I first used an event study to calculate abnormal returns (with event window of 7 days so 7 observations for 500 firms) ...
mek1401's user avatar
1 vote
1 answer
2k views

ARIMA or SARIMA scale and normalize data

Good evening everyone, I am here to ask a question regarding the statistical models ARIMA & SARIMA use to build predictive models based on past values and with the intent of predicting future ...
Alessandro Pio Budetti's user avatar
0 votes
0 answers
15 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
0 votes
2 answers
212 views

Categorical variable with multiple labels

I have a silly question - I have in model several variables with 100+ possible labels each (like Country that stores country code, Industry storing industry code, etc.) - I have to somehow convert ...
funkurlif3's user avatar
3 votes
1 answer
541 views

Ordinal vs multinominal classification in XGboost: differences in one-hot encoding

I have followed this post and tried to see if there will be any difference in predicted probabilities if I use different one-hot encoding in XGboost. This is my code with some dummy data, which is ...
deblue's user avatar
  • 369
1 vote
0 answers
40 views

How do I regress income quartiles against each other?

I'm looking to find out whether an attitude differs across income quartiles. My supervisor has mentioned dummy coding and regressing the quartiles against each other, however, I'm sort of at a loss as ...
Lucy S's user avatar
  • 11

1
2 3 4 5
17