Questions tagged [regression]

Techniques for analyzing the relationship between one (or more) "dependent" variables and "independent" variables.

Filter by
Sorted by
Tagged with
1 vote
0 answers
31 views
+50

Why do fixed effects in a logistic regression model differ depending on the presence of a random slope?

If I have two linear regression models, one with a random slope and one without (but otherwise identical), the fixed effects in the two models are identical. My understanding is that this stems from ...
user avatar
  • 3,505
1 vote
0 answers
21 views

Ordinal logistic regression with interaction

I have a dependent variable donation intention on a 7-point likert scale(1=totally disagree, 7= totally agree), an independent variable which is a dummy (0= price is not framed, 1 = price is framed) ...
user avatar
  • 11
1 vote
0 answers
34 views

Binomial regression with non traditional dataset

I am aiming to do a binomial regression, most aspects are close to textbook situations. But not on the datasets side, while I have a traditional dataset, that will split into training, test and ...
user avatar
1 vote
2 answers
33 views

Identifying confounders in multiple linear regression

I am currently trying to identify confounders in a multiple linear regression, but I am a little unsure of a couple of steps. These are the steps I am taking: Check to see if the potential ...
user avatar
  • 11
0 votes
1 answer
20 views

R: emmeans back-transformation when using a constant value in the response formula

I am fitting a linear mixed model ...
user avatar
  • 457
1 vote
0 answers
13 views

Negative Binomial Regression with Moderation Effect

In H1, I predict the positive effect of a program on the consumer spendings. In H3, I want to predict the positive effect of a program on the number of referrals, while also predicting the positive ...
user avatar
  • 11
1 vote
0 answers
89 views

Ordinal Regression - Using a Continuous Attribute of 3 Categories as a Covariate as a Proxy for the Categories

I'm conducting an ordinal regression with SPSS 28. I have 3 subsets in my data (n=87 total, mostly equally distributed between the subsets) that represent 3 different scenarios where study ...
user avatar
  • 73
1 vote
0 answers
25 views

Assessing a single predictor with linear modelling [closed]

I have data that involves countries in and out of Europe, life expectancy, social support and expenditure per GDP. I want to assess how successful a single country in terms of life expectancy given ...
user avatar
  • 113
0 votes
0 answers
13 views

Should I normalize (preprocess/scale/log-transform) my data "before" imputing missing values with missRanger?

I am trying to impute missing values using missRanger package. missRanger is apparently much faster than missForest. I would like to know: 1 - Are these two packages any different in their imputation ...
user avatar
0 votes
0 answers
30 views

Estimating the coefficients of a non-linear regression

I am trying to estimate the coefficients $\lambda, \alpha, \beta_1, \beta_2, \gamma, \eta$ in the below equation using Python and some financial data $$ \lambda \times \text{(participation %)} \times \...
user avatar
3 votes
1 answer
26 views

Features are Relevant for Regression but not necessarily for Classification - what to make of this?

I have used the R Boruta package to check for feature relevance in predicting log returns of financial time series, the targets being the log returns themselves (for regression) and the sign of log ...
user avatar
1 vote
0 answers
23 views

Lasso regression only predicts order of model correctly when poly() is set raw = TRUE?

I'm looking at exercise 8 in chapter 6 of Introduction to Statistical Learning and have noticed that the ability of glmnet() to correctly identify the non-zero ...
user avatar
  • 11
0 votes
0 answers
13 views

Constructing a time dummy variable in DiD fixed effects model

I am using a Diff-in-Diff regression design to evaluate the impact of a county-level tax hike (i.e. treatment variable) on tobacco sales (i.e. outcome variable) in a given county, relative to counties ...
user avatar
  • 105
2 votes
1 answer
36 views

Regression of a time series difference

Suppose $x(t)$ and $y(t)$ are two time series. I regress $y(t)$ against $x(t)$, and obtain $$y(t)=ax(t)+b+z(t) $$ for some regression constants $a, b$ and residue $z(t)$. Define $\Delta u(t):=u(t+1)-u(...
user avatar
  • 875
1 vote
1 answer
48 views

Collinearity problem

Consider a linear regression of this type: height: beta_0 + beta_1*weight. Adding BMI as parameter would add complexity to the problem or just cause a collinearity problem?
user avatar
1 vote
0 answers
10 views

The p value of my OPLS-DA model was -nan(ind), I don't know, what's mean, and the residual MS was infinite, I need help here?

I obtained for the first time strange cross-validation results of my OPLS-DA model, the CV ANOVA was -nan(ind), SD residual was inf, MS residual was inf also, moreover, F test equal to zero. The ...
user avatar
9 votes
1 answer
663 views

What can be done about assumption violations in logistic regression?

I am working on a logistic regression solution, and I'm experiencing some issues with assumptions according to the diagnostic graphs.For linear regression, I am familiar with addressing similar ...
user avatar
  • 203
3 votes
1 answer
45 views

When is least squares better than reduced major axis?

Consider two linear regression methods: least squares regression (LSR) reduced major axis (RMA) I know the definitions of both regression methods but I would like to know when is the LSR better than ...
user avatar
1 vote
0 answers
18 views

MAPE does not take into account the range of the output?

I have a time-series regression model where the output is always in the range of 6000-6050. After training my model, I get a Mean Absolute Error of around 18 and hence, very low Mean Absolute ...
user avatar
  • 11
0 votes
0 answers
21 views

Using target values in both (X and y) arguments of fit(X, y)

This question is based on SQL Server Machine Learning Services Ski Rental tutorial. We have a dataframe df: ...
user avatar
  • 101
6 votes
1 answer
222 views

Ridge or multiple linear regression following PCA?

I have a real world clinical dataset with a severe issue of p >> n. I have thus decided to run PCA before modelling the data. This leads to a dataset with 150 samples with 85 features. I would ...
user avatar
  • 185
0 votes
0 answers
7 views

Level 3 variance increase when adding a contextual predictor?

I am conducting a multilevel regression analysis on a survey dataset that has three levels: Individuals - Country-Years- Country. I am regressing a series of time varying and time invariant ...
user avatar
0 votes
0 answers
28 views

How to prove change in a time series when the population is growing?

I have a small dataset with data on the number of heart and liver donors from deceased patients each year (from 2012 to 2021). I would like to find out if there has been a change in the number of ...
user avatar
  • 45
0 votes
0 answers
8 views

Sufficient conditions for equivalence between regression on individual or group average data

I have often hear that running a regression on individual or (properly weighted) aggregated data should give the equivalent results, for example in this question or in Mostly Harmless Econometrics, ...
user avatar
  • 253
0 votes
0 answers
22 views

From OLS regression to Logistic Model

I'm currently working on my master's thesis in finance. Without going into to much detail, my goal is to regress certain predictors on first-day returns (SPAC IPO performance). However, after ...
user avatar
  • 101
3 votes
2 answers
128 views

Bayesian Poisson Regression with Gamma Prior Formulas

Are there closed form formulas for the posterior and evidence of a Poisson-Gamma Bayesian regression model? I was not able to find anything that is accessible online. I am not sure for which model can ...
user avatar
  • 2,376
0 votes
0 answers
23 views

What is the interpretation of the varImp() function

Computing the variable importance of different types of models with varImp(model), the obtained results are as follows: ...
user avatar
1 vote
1 answer
28 views

Difference-in-differences if the control group is treated later

Would a difference-in-differences analysis still tell me something important if the control group was treated later in time? Or, would I be better off only restricting my analysis to the time frame up ...
user avatar
  • 23
1 vote
2 answers
33 views

Why use transpose of nabla in gradient descent

For gradient descent we have the formula: $f(x_{k}+d_{k})\approx f(x_{k}) + \nabla f(x_{k})^T d_{k} $ What I don't understand is, why we use the transpose of nabla and not just nabla.
user avatar
  • 13
0 votes
2 answers
28 views

why the p value changes when I run a linear mixed model instead of a simple regression? and how random effects affect the output?

I ran two models, a linear regression model and a linear mixed model, I did this because I was suspecting that there were some levels or hierarchy in my data, specifically in my subjects and ...
user avatar
0 votes
1 answer
23 views

Difference In Differences with Daily Numbers

I ran a DID regression and found my estimate on the DID coefficient to be .022. The units of time I am using are days, and at a certain day around halfway through my data, the treatment group was ...
user avatar
  • 23
1 vote
1 answer
47 views

Linear Regression with Lasso Regularization by using scikitlearn and scipy.optimize

i am trying to apply lasso linear regression with both scikitlearn and scipy.optimize min method. However, i cannot reach same result. Code that i created with scipy.optimize can't shrink redundant ...
user avatar
0 votes
0 answers
17 views

(Undergrad looking for help) In logarithmic regression (log-log), what does it mean if your explanatory variable is already a percentage?

So I'm hoping to a regression of Human Development Index against some economic variables I think could affect it. Some types of aid per capita, education spending by government as a percentage of gdp, ...
user avatar
0 votes
0 answers
12 views

Is Platt scaling applicable to a small sample size?

I am learning predictive modeling and recently came across the calibration technique called Platt scaling. I want to ask: Is this technique applicable to the small sample size such as my project (n=...
user avatar
1 vote
1 answer
16 views

Comparing Activities with regression

I am trying to find out what is the effect of activities(like jumping, weight lifting etc.) on behavior (such as attitude towards participating in a marathon). (sample size of 60 observations for each ...
user avatar
  • 11
0 votes
0 answers
13 views

Regression with independent variables as percentages [duplicate]

I'm trying to run a regression analysis where my dependent is number of deaths and some of my independent variables are things like: poverty rate (Ex - 0.16, 0.09), incarceration rates (Ex 0.0042, 0....
user avatar
  • 1
0 votes
0 answers
21 views

What happens if the "coefficients" in the data generating process are correlated with the variance of the error term?

Suppose we are interested in estimating a regression of the form $$ y = \beta x + \epsilon $$ but in the data generating process, $\beta$ is decreasing in $\mathbb{E}[\epsilon^2]$. For example, there ...
user avatar
0 votes
0 answers
15 views

How to reconcile model results?

I have a logistic regression in which I am evaluating animal selection for various categorical landcover types (woody, herbaceous, bare), canopy cover (continuous variable), and vegetation density (...
user avatar
  • 33
0 votes
0 answers
9 views

Using AIC with OLS- should I use Z scores [duplicate]

I apologize at the start- I am not a statistician. The first response to my post suggested I did not phrase my question properly. I have tried editing the question to focus on my primary concern. I ...
user avatar
0 votes
0 answers
8 views

Serial mediation Hayes Process 6 with SPSS; 2 mediators - issues with paths a1 and a2

I have the following issues which I would like to understand: I have recently run a Hayes Process 6 analysis. I have checked for outliers (Mahalanobis, Cook's and Leverage and excluded cases that did ...
user avatar
0 votes
0 answers
18 views

Can I compare the size of the regression coefficients of an ordinal and categorical variable?

I am running an OLS regression that includes variables such as nationalism, social class, educational qualification, age, etc. as predictors of social capital (dependent variable). I want to compare ...
user avatar
3 votes
1 answer
73 views

How to deal with crossed and nested factors at the same time in a linear mixed model?

I've recently started analysing the data for a project using linear mixed models but am not sure how to deal with crossed and nested factors at the same time. In my study, each participant reported ...
user avatar
0 votes
0 answers
24 views

How to interpret independent dummy variables in logistic regression?

I have both quantitative and dummy independent variables in my logistic regression. Dependent variable is binary. I have 2 questions. How to interpret a quantitative variable that is negative? How to ...
user avatar
  • 31
0 votes
0 answers
12 views

Uniform measurement error in "errors in predictors" regression

I'm working with cancer incidence data that uses a range of ages (e.g. <1, 1-4, 5-10, ...) rather than a single value. I want to fit a model where age is a predictor. As a result, I'm curious ...
user avatar
0 votes
1 answer
13 views

multiple Regression Analysis for categorical and continuous varibles

I'm conducting a regression analysis between a dependent variable ( continuous) and two independent variable one is categorical ( nominal , yes and no value) and the other is continuous . is the ...
user avatar
  • 1
1 vote
3 answers
86 views

Regression coefficients do not match conditional means

In a nutshell, I want the regression coefficients of a model to match several differences in conditional means. You can download the data from this repo. I have a data set that has a dependent ...
user avatar
1 vote
0 answers
37 views

Interpretation of Relative Difference in Differences Results with Relative Units

I am writing a paper using a difference-in-differences analysis. My control and treatment groups are groups of 7 or 6 states that either do not or do undergo a certain policy. I ran my difference-in-...
user avatar
  • 23
0 votes
0 answers
8 views

Empirical risk minimization for relu/max loss function

Classical risk minimization (RM) minimizes the expected loss over the training distribution $p_{\mathrm{train}}(x)$, $$\theta^*_{RM} = \arg \min_\theta E_{p_{\text{train}}}[\ell(x, \theta)].$$ As the ...
user avatar
  • 101
0 votes
0 answers
13 views

variance of Y based on a simple linear regression of X in which the slope and intercept are not constants

Consider a linear regression $y = aX + b$, where mean(a) = 5, SE(a) = 0.5; and mean(b) = 3, SE(b) = 0.1. When a and b are constants, $Var(Y) = a^2 Var(X)$. Do the SE's make a and b non-constants? If ...
user avatar
  • 51
0 votes
1 answer
26 views

Estimated marginal means against raw mean when only one predictor

I'm learning about estimated marginal means and I found this very interesting tutorial about it. I get almost all of it, especially the fact that with a multivariate analysis we can extract modelled ...
user avatar