Questions tagged [regression]

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

Filter by
Sorted by
Tagged with
11
votes
2answers
618 views

How to make predictions with non-parametric regression?

Let's say I have a dataset to which I have estimated a relationship using non-parametric regression, specifically Kernel (obviously in this hypothetical example it's probably overfit slightly). The ...
3
votes
1answer
57 views

Understanding offsets for continuous variables

I'm currently trying to write a linear model with data from some behavioural experiments with termites. I started to read Ben Bolker's "Ecological Models and Data in R", which has been a ...
0
votes
0answers
14 views

How to address control, extraneous and confounding variables?

I was going through a tutorial here and it has the below info "Controlling for a variable” means modelling control variable data along with independent and dependent variable data in regression ...
0
votes
1answer
12 views

repeated measures poisson? R

have searched and found similar qs to mine but still confused on how to approach this.. i have data (dat) of the following form favorite veg group1 group2 Avg IQ ...
0
votes
1answer
45 views

Is it appropriate to use state or time fixed effects in a difference-in-differences model?

I am running a regression which analyzes the effects of a state level policy on crime rates in America. I am using the difference-in-differences estimator and I'm not sure whether I can still add ...
1
vote
0answers
25 views

t-test vs linear regression: how are standard errors calculated?

Consider Stata's auto dataset. I am interested in finding the difference in the mean weight of foreign and domestic cars. To do this, I can do a two-sided unpaired ...
0
votes
0answers
9 views

Multiple explanatory variables Levene Test and Lack-of-Fit Test [R]

I created a multiple regression model in R to predict a variable and am checking the regression assumptions of that model. I need to do the Lack of fit test and the Levene test for the linearity and ...
2
votes
0answers
40 views

When and why should R squared be used instead of adjusted R squared?

The title says it all. In what situation R squared (non adjusted) is more useful and should be used instead of the adjusted one? Why?
4
votes
3answers
201 views

OLS estimators for non-linear models

I have read that when the regression model is in a linear form, using the OLS method is a good idea. When instead, the model is not linear (for example, probit or logit) OLS method is not a good idea. ...
0
votes
1answer
13 views

Regression: predicting time using distance

I have a trip duration dataset that looks like this: I want to use other parameters to predict the waiting time (wait_sec). The waiting time refers to the time the vehicle is stuck in traffic or so. ...
1
vote
1answer
25 views

What type of regression/estimation technique is suitable?

I am modelling the dynamic conditional correlations of a couple of assets via DCC mgarch. I also have some exogenous variables that try to explain these correlations. Since my dependent variable is ...
4
votes
1answer
120 views

Does dependency imply an equation?

On regression, we usually think of dependency in terms of an equation relation between variables. For instance, we think that $Y$ "depends" on $X$ If $$E[Y|X] = g(X) + \epsilon \quad \mbox{...
3
votes
3answers
122 views

Using OLS estimators in Binary models

I have a simple and maybe banal question, but I haven't find a clear explanation on internet, so i'm asking. When we have a model in which the dependent variable is a Dummy (Binary Model), why we have ...
0
votes
0answers
21 views

MLE of regression coefficients depends only on correlation matrix and single-predictor z-scores

Assume a standard linear model $$ \boldsymbol{y}=\boldsymbol{X}\boldsymbol{\lambda}+\boldsymbol{\varepsilon}, $$ where $\boldsymbol{y}$ and the columns of $\boldsymbol{X}$ are standardized. In some ...
2
votes
1answer
50 views

Least square regression weight estimation for $\beta_1$ and $\beta_2$?

So, I have been looking at this post, and others that are similar and know that the least square estimation of $\beta_1,\beta_2$ will be $(X^TX)^{-1}X^TY$, where the model is $Y_i = \beta_1x_{1i}+ \...
0
votes
0answers
10 views

which kind of regression to apply in this case? (time series)

I have a daily time series data (independent variable) but the dependent variable only changes weekly. I.e if we have $N$ observations for the independent variable we only $N/7$ observations for the ...
0
votes
0answers
20 views

Omitting dummies in panel regression?

I am running a regression studying the effects of different interventions (which appear as dummy variables - they either did or did not have that particular intervention). I don't have a control group ...
1
vote
0answers
11 views

Difference between glmnet and nnls for non-negative least squares in R

I'm trying to do some non-negative linear regressions in R, and I found in the blog here https://www.r-bloggers.com/2019/11/non-negative-least-squares/ that either the package ...
0
votes
0answers
15 views

When to use ridge regression or lasso rather than elastic net?

If one has no ex-ante information about what the L1-ratio hyperparameter should be in the context of elastic net regularization, when should one instead use lasso or ridge? This ratio is referred to ...
1
vote
0answers
23 views

Understand wx+b for (linear) regression [duplicate]

Though I'm a while in this field I recognized that I can't say for sure that I understood this basic, very simple equation $ \hat{y} = xw + w_0 $ I know $ w_0 $ denotes the bias term (mostly given as $...
0
votes
0answers
24 views

How to train a linear regression if the number of sample features is variable (time series) (in sklearn)

Let's assume for the samples $\{(x_i,y_i)\},$ the $dim\ x_i$ is variable, e.g. a time series $x_i = (x_{i1},\cdot,x_{iT_i}).$ Then how do we train a linear regression for such samples? Especially how ...
0
votes
1answer
33 views

Naive-elastic net and elastic net variable selection comparison

The elastic net paper (here) introduced the naive-elastic net and elastic net. The coefficient estimates of naive-elastic net are obtained by solving the problem $$\hat\beta_{naive-enet}=\text{argmin}...
0
votes
0answers
16 views

Large negative intercept value in python statsmodels regression for a time-series [duplicate]

I am quite new to regression analysis and am using python's statsmodels. My dataset is a time-series, which consists of values of a variable recorded for a long ...
0
votes
0answers
18 views

How to apply second order differencing to time-series regression?

I have the following regression where the dependent variable is I(2), i.e. I need to apply the second order difference to make it stationary. Now the question would be whether I have to apply the ...
0
votes
0answers
11 views

Interpret coeff for quarter and year data

I have quarter level data for 10 years for some continuous variable, Y. The final model is Y=intercept + 2 *qtr + 4 * year. I have qtr variable to adjust for seasonality. While I understand how to ...
0
votes
0answers
12 views

Poisson regression-GEE for small sample size or fixed effects

I am running a Poisson regression to estimate the yearly trend on number of accidents in 6 cities. The data is at a quarter level over a 10 year period. I ran a GEE model and as expected the standard ...
0
votes
0answers
22 views

Inclusion of correlated dependent variables in a logistic regression (seed dispersal from shrubs)

I am trying to model seed dispersal from shrubs, and I am wanting to explore if number of seeds on an individual shrub, plus the seeds in the surrounding neighborhood, affect percentage of seeds ...
2
votes
2answers
33 views

What if a model is gets a non significant in F statistic regressor test but lack of fit test shows that there is no strong evidence of lack of fit

What does it mean when a model is gets a non significant in F statistic regressor test but lack of fit test shows that there is no strong evidence of lack of fit. Can i still use the linear model if ...
1
vote
0answers
18 views

Omitted Variable Bias and Causal Relationships between Independent Variables

I am working on a linear modeling task and I'm trying to find the right variables to include in the model. I need to estimate whether the causal effect of one independent variable on the percentage ...
1
vote
1answer
16 views

Specifying (and interpreting) LMMs using factorial designs with nlme/lme4 - should variables be coded as factors?

I’m trying to specify (and interpret) a LMM using data with the following factorial design: • Condition (Active/Sham: between-subjects) • Session (1/2/3: within-subjects) • nbacklevel (1/2: within-...
2
votes
1answer
21 views

Truncated data in Neural Network regression

I'm working on a Neural Network regression problem and the variable of interest (trade flows) that I'm trying to predict is skewed and truncated at 0. I first tried to fit the model without prior ...
1
vote
1answer
21 views

R-squared value for a multiple regression analysis

The R-squared value for a regression analysis on two predictor variables is 0.90. Explain what this means. This implies that two predictor variables account for 0.90 or 90% of the total variation in ...
0
votes
0answers
17 views

How to interpret regression results (simple returns, first difference)

I have run the following regression: where, r is the simple return of a daily stock index, SENT is the daily level of a custom sentiment index, and ΔVIX is the first difference of the VIX (the VIX is ...
1
vote
1answer
19 views

What does it mean for regression to the mean to “work backward in time”?

Please see the emboldened phrase below.       Then the hammer drops. The triumph of mediocrity observed by Secrist, Hotelling points out, is more or less automatic whenever we study a variable that’s ...
0
votes
0answers
26 views

Why does adding a variable to my regression remove the coefficient of another? [closed]

I am working on a dataset where satisfaction score is the dependent variable based on a control group that works from home and treatment group that does not work from home. However, I want my ...
1
vote
0answers
28 views

Ordinary Least Squares or Binomial Regression for count data with few trials

My general question is when should one use OLS and when binomial regression when the outcome is count data with a fixed upper limit. When the upper limit is large (like 1000) and most values are ...
0
votes
0answers
32 views

Including GDP in regression discontinuity framework

I want to conduct an regression discontinuity in time with daily data. I use the following regression model, where rating is the dummy variable (0 before the rating ...
0
votes
0answers
22 views

What are the consequences of non-normal errors for OLS?

I cannot find a clear answer online to what seems to be a rather simple question. Anyone willing to share relevant sources or answer the question here?
1
vote
1answer
28 views

How to deal with participants that don't last through a treatment?

My study involves repeated measures to compare the effectiveness of two distinct drug formulations at reducing the volume of an abscess, measured at three time-points (one baseline and two follow-ups),...
0
votes
0answers
17 views

Question on Decile Analysis - Logistic Regression

I was doing a comparative research on Decile Analysis vs Confusion Matrix and came across the this link: https://cran.r-project.org/web/packages/blorr/vignettes/introduction.html When Binomial ...
4
votes
1answer
64 views

Different slopes when using a generalized linear model versus a linear model in R?

I have a small data set that I am trying to analyze and have looked at it with both a linear model and a generalized linear model. The data are from seed traps placed beneath shrubs. The "...
3
votes
0answers
17 views

Should an ordinal variable in an interaction be treated as categorical or continuous?

I have an ordinal categorical variable (A, with 3 categories). There are 2 ways to include it in a regression model: 1) as a factor or as 2) a continuous variable. ...
2
votes
1answer
21 views

Should I scale targets when building regression model with multiple objects?

I'm using TensorFlow 2 to build a regression neural network with four numeric output objects. Each object has a distribution that is close to the normal ...
1
vote
0answers
11 views

Why the standard errors of logistic regression are of that form?

In Elements of Statistical Learning, page 125 it is written that the coefficients of a logistic regression converges to $\mathcal{N}(\beta, (X^T W X)^{-1})$ with: $X$ the $N \times (p+1)$ matrix of ...
0
votes
0answers
20 views

Percentage of variance explained by predictors changing with order

Let's supose the following database: ...
0
votes
0answers
9 views

Regression - How to control for different ranges in multiple groups

I have a dataset of salary and demographic data. I want to perform a regression analysis to determine if demographic factors (age, sex, orientation etc) influence an individual's salary. Within this ...
1
vote
0answers
27 views

Is it advisable to formally compare (e.g. with a test) the odds ratios from logistic regressions in 2 different survey years?

I'm doing an analysis of several years of a large survey, regressing an $outcome$ on some predictors $P_1$, $P_2$, $\dots$ $P_n$ using logistic regression in each year. My study design is a bunch of ...
0
votes
0answers
22 views

Creating a composite independent variable from two categorical variables?

I have two predictor variables, one of which has measures how often a participant smokes in 5 levels (< 1x/week, 1x/week, 3-4x/week, everyday, and +2x/day). The other predictor is a categorical ...
1
vote
1answer
21 views

multiple regression model having 2 independent variables [duplicate]

I run a multiple regression model having 2 independent variables. The R-squared value for my regression analysis on two predictor variables is 0.75. How do I interpret this value?