The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [regression]

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

19,243 questions
Filter by
Sorted by
Tagged with
2 views

Equivalence Testing in multivariate regression models

This questions seems to have been asked, but never answered before. The question I have is: is it possible to implement the idea of equivalence testing in multivariate regression models? For example, ...
13 views

which interactions to explore between sex, age, height to predict weight

As a learning exercise I'm running linear regression to predict person's weight from: sex, age, height. here's a few sample lines ...
7 views

Help with using Ordinary Least Square Regression [on hold]

Error in summary(model_ols) : object 'model_ols' not found
5 views

Problem with deriving beta coefficient in linear regression [on hold]

Given where estimate of b, b hat can be expressed as How to get b hat in following form?
8 views

Treating Outliers

Can the below methods be used for outlier treatment? 1. Capping the outliers with percentile values (1st-99th, 5-95th)? 2. Capping the outliers with Q1-1.5IQR, Q3+1.5IQR (will it lead to bias?) 3. ...
60 views

Is the assumption of normality of the error term needed to use p-value?

I have been thinking lately about the following: 1. Is the normality assumption of the error term really needed in order to make use of p-values for linear regression models? A previous CV post (...
7 views

Oversampling methods for numerical data (regression)

There are many oversampling methods for categorical labels (for example SMOTE and Rose, etc.). But, are there oversampling method for numerical labels (the thing that I want to predict with my ...
10 views

Use of expression “statistically significantly predicts” based on in-sample analysis

Suppose one estimates a linear time series model $$y_t=\beta_0+\beta_1 x_{t-1}+\varepsilon_t$$ and finds that $\hat\beta_1>0$ and the $p$-value associated with $\hat\beta_1$ is lower than the ...
67 views

Should I do a regression analysis even if the variables do not seem to be associated at all?

I apologize in advance if this possibly is a stupid question but I am feeling very insecure about my statistic skills so I hope someone can help with these basic questions. Also I apologize for my ...
17 views

What statistical techniques can I use to model improvement over time?

Say you have a group of 30 students and you measure each individual's performance on a test at 4 intervals throughout the year. (For the purpose of this investigation, assume the tests taken are ...
15 views

Multicollinearity when estimating a gravity model

everyone! I am estimating a gravity model in order to analyze the impacts of tighter environmental regulations on international trade. More specifically, I am analyzing Brazil's trade flow. My (...
11 views

Resources suggestion about linear model

I was wondering if you could tell me about some self-learning resources for linear model theories. My professor has been using "A First Course in Linear Model Theory, Ravishanker and Dey. Publisher: ...
8 views

Determining suitable methods for statistical analysis with several variable

I hope this is an appropriate place to post this question, apologies if it is not. I'm trying to determine the best method and statistical tests to use for analysing data I have collected for element ...
30 views

is “multivariable linear regression” the same as logistic regression?

I am new to machine learning and I am simultaneously studying linear and logistic regression. Logistic regression is when there is one dependent variable and there may be more than one independent ...
7 views

how to calculate pre and post measures degrees of freedom across participants

I have 10 participant and I want to measure if there is a correlation between their main measure and a clinical condition. I want to know how to calculate the degree of freedom pre and post measures ...
9 views

how to understand an unit of analysis

I came a cross a definition which I cannot understand the logic. is there a way to explain what is the problem ? a longitudinal design for an intervention study in 10 participants where the ...
26 views

Regression analysis not showing the first level of treatments

I have my data that looks like this: data: or in R: ...
17 views

Is beta regression appropriate for this question?

I have a data set with death rate per 1000 birth as the response variable. The range of values for the response variable is [0.03 - 0.89]. The question to find association between death rate and other ...
7 views

Interpretation of linear, quadratic, cubic outputs of ordinal predictors in glm calculation

I have a binary dependent variable, and some numeric, binary, and ordinal independent variables. The whole idea is to create a predictive model based on all these data, which can be reported to others,...
16 views

Determining weights for fitting non-uniformly spaced measured data (v2)

Let's pretend I have some data to which I want to fit a line. If the data are uniformly spaced along the x-axis, I get the following: If the data are not uniformly spaced, I get a different fit line:...
8 views

Use LCA memberships as independent variables in a linear regression model

I performed LCA using the "depmixS4" library in R and got a three cluster solution for my data; as such for each record in my data, I have three LCA memberships (probabilities) for the three clusters ...
45 views

How to fit a Linear Regression model with linearly related predictor variables

I have three predictor variables x,y and z and a outcome variable "grade". The three predictor variable are linearly related (x+y+z=1). When I fit a linear regression model using these variables, I ...
27 views

Regression analysis with multiple categories

I have this data below which I am analyzing using R. First, I am trying to find which predictors (chem1, chem2 and chem3) have effects on yield for this data. I did this model test below and found ...
29 views

Matching vs simple regression for causal inference?

This is a really simple, newbie question. I am really confused about the notion of matching and when it can be used instead of a multiple regression? Assume I have listed all the confounding ...
30 views

Legitimacy of Regressing Actual Values on Predicted Values for Better Residual Sum of Squares?

A coworker of mine recently performed an analysis where after training a simple linear model, he regressed the actual Y values against his model's predicted Y values, and applied this regression's ...
21 views

Point estimate options with highly skewed data

(Added regression tag since I think that my question overlaps with that area but not sure. Added transformation tag since I discuss log transformations. Tag recommendations welcome) I would like to ...
21 views

Add Absolute Value as a Feature

In a machine learning context, does it make sense to have both a measurement and its absolute value transformation as features? There are already ~120 features in this predictive model (an elastic ...
19 views

Determining weights for fitting non-uniformly spaced measured data

I have a system of generally known behavior, and some non-uniform measurements of that behavior (let's say without measurement error). Now I want to fit a simple function to a subset of the ...
172 views

Use of expression “statistically significantly positive”

Suppose one estimates a linear model $$y=\beta_0+\beta_1 x+\varepsilon$$ and finds that $\hat\beta_1>0$ and the $p$-value associated with $\hat\beta_1$ is lower than the chosen significance ...
40 views

Lasso regression doesn't converge in case of zero Y-vector

I try to use lasso regression to solve linear problem with big amount of equations (~10 000). Everything worked fine, but I noticed that if in Y-vector all elements are equal, "fit" function hang for ...
14 views

Applying logistic regression with response and expected response

I hope my title is phrased correctly, otherwise feel free to rephrase it. This is my first time working with such a data set and i'm trying to understand if a method i'm using is correct. Here is a ...
20 views

How many experiments to run (sample-size) if I know I am going to feed them to a non-parametric regression?

I have 2 input variables, $X_1$ and $X_2$ that affect output variable $Y$. I can run experiments where I modify the inputs and measure what happens to the output. Now, if $X_1$ and $X_2$ were binary, ...
14 views

Does endogeneity problem matter when proving the existence of association/causality relationship?

In social science field (particularly Finance and Operations Management), we usually need to prove or disprove hypotheses of the type: X are positively associated with Y. One of the typical method to ...
7 views

Different results with different functions for competing risk regression with Fine-Gray model

I am doing competing risk regression. I have three possible functions and one of them produces completely different results than other two. In my dataset I have time to event, status (censored=0, ...
27 views

What kind of multiple regression should I use?

I have a lognormally distributed continuous dependent variable that I would like to predict using multiple regression. I am using a forward selection process and have selected three predictor ...
18 views

Polynomial regression: Poorer fit by increasing the degree of polynomial

I was playing around with polynomial regression and the idea of overfitting. So I decided to approximate $\sin(x)$ between $-\pi$ and $\pi$ through a polynomial function of x. All fairly standard ...
17 views

What statistical test is most appropriate when my data consist of multiple series, each based on an individual sample?

I'm trying to determine the effect of an interferent $X$ on the measurement of a substance $Y$. Ultimately, I'm looking to predict $Y_{actual}$ within a confidence interval, given $Y_{observed}$ and a ...
9 views

Using count (instead of proportion) data with cbind() in R… in both dependent and independent variables?

In a study I hypothetically conducted, I have the number of times individuals pressed an "A" button and the number of times they pressed a "B" button. I also recorded the numbers of times they made ...
29 views

Linear model selection after bootstrapping without overfitting

I am trying to develop a model between a 19 year record of climate data and a 19 year record of ice-off dates on rivers. The two variables are linearly correlated. The goal is to build a linear model ...
17 views

Reasoning behind dichotomization of (explanatory) categorical variable for binary logistic regression?

Generally speaking, what would be the idea behind dichotomizing ordinal, categorical variables for binary logistic regression. To be clear, I'm not talking about the dependent variable but only ...
19 views

Gaussian Process Regression - Draw from posterior

I recently came across Gaussian Process Regressions and started exploring it a bit further since it grabbed my attention. In Rasmussen's book Gaussian Process Regressions for Machine Learning I found ...
13 views

Too large standard errors of parameters from the covariance matrix when fitting data using curve_fit [on hold]

I have some troubles when try to fit my data using curve_fit. I don't really know where I am wrong: in code or in math. First, I have too large variances which I get from the covariance matrix: ...
81 views

How to understand carry out the “score bootstrap”? [on hold]

I want to translate the "score bootstrap" that Kline and Santos (2011) propose into R code. The algorithm is described on page 6 as follows. STEP 1: Obtain the full sample OLS estimate $\hat\beta$ ...
19 views

How to compare a model with my data [on hold]

using R I have to compare a model, that is the Fitt's law, with my data. In particular the Fitt's law states that MT = a + b × log2(2D/W), with MT is the time needed to perform a task, a and b being ...
35 views

Uncertainty Quantification in Time Series Analysis

The stock market value of the data point connected by the red line is predicted by linear regression using market values as well as Twitter sentiment data and more in a certain period of time (red ...
13 views

How to compute RSquare from GLS regression in a Fama Macbeth procedure

I am trying to compute the RSquared from the Fama Macbeth procedure using GLS regression, but for some reason I get negative values, so I was wondering what the problem might be. The Fama Macbeth ...
17 views

Information about independent variables in poisson regression

Can independent variables in Poisson model, Negative binomial model and Hurdles model be categorical ?
14 views

One versus One and One versus All multiclass classification using logistic regression in python [on hold]

This is my understanding of OvO versus OvA: One versus One is binary classification like Banana versus Orange. One versus All/Rest classification turns it into multiple different binary classification ...