Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [regression]

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

0
votes
0answers
13 views

How can I change the number of bins specified when calculating Weight of Evidence? [closed]

I wish to calculate the weight of evidence of a variable x, which is positively skewed, with over 6000 of the observations are 999 but only 200 range from 1-27. I used the code, ...
0
votes
0answers
34 views

How can I use k-fold cross-validation to determine whether a linear regression model performs significantly better than chance?

I have an experiment in which I present a subject with 1820 inputs. For each input, a response is produced in ~25,000 separate output variables. I have a function F which produces a feature vector ...
-1
votes
1answer
46 views

True or false? (Ridge regression has higher error rate than standard linear regression for test set)

When using ridge regression, we would expect the error/loss function on the test set to be higher than if we used standard linear regression with no penalty. I know that for the training set, the ...
1
vote
1answer
24 views

2-step linear regression

Very simple problem: First model: I run a linear regression of $Y$ on $X$ and $Z$. Second model: I regress $Y$ on $X$ only, compute the residuals, and regress these residuals on $Z$. Why do I ...
0
votes
0answers
12 views

Calculating mean square error for a knn regression object

I'm fairly new to knn, R implementation and am trying to figure out how to calculate the MSE for a model that uses knn based on linear regression with 3 nearest neighbors and get the error shown above....
0
votes
0answers
12 views

Why it is hard for `xgboost` to learn periodic functions?

In this simple example, I try to train a xgboost regressor to learn a periodic function: ...
0
votes
0answers
16 views

Simple regression line of y against x coincides the simple regression line of x against y if and only if r^2=1. Prove [closed]

Show that the simple regression line of y against x coincides the simple regression line of x against y if and only if r2=1. Here, r is the sample correlation coefficient between x and y.
0
votes
0answers
8 views

evaluation result is bad on training dataset [closed]

I train a dnn regressor model and use the trained model to evaluate the training dataset. The training loss is low however the evaluating loss is very high. I am confused by this. As I know, even if ...
0
votes
0answers
7 views

What is suppression? [duplicate]

What does suppression mean in plain language? If you find that there is not a relationship between two variables while conducting a regression analysis, but controlling for a third variable reveals ...
1
vote
1answer
28 views

Create composite variables using items with different scales- dealing with multicollinearity

I have IV's that are highly correlated with one another. The first set of correlated IV's, I combined them by adding the score and dividing by 2 to create a composite score. This was simple because ...
5
votes
1answer
28 views

When does the boundedness of the dependent variable become problematic in linear regression?

Linear regression assumes that the dependent variable ranges from $-\infty$ to $\infty$. Many (most? all?) real DVs do not actually have such a range. For instance, the weight of adult male humans can'...
2
votes
0answers
32 views

What is actually being modeled in binomial logistic regression?

One thing I've been struggling with for a while is this: When the binomial logistic regression model includes different number of trials across the observations, what are we estimating at the end of ...
2
votes
1answer
17 views

Interpolating principal component

In my thesis, I use PCA from a bunch of WVS responses to measure the social capital of a country (aggregating principal components to country averages). However, WVS provides a quite low frequency of ...
0
votes
0answers
16 views

Difference-in-Difference model where treatment intensity increases over time

I'm currently trying to figure out whether a specific Diff-in-Diff model makes sense. Suppose I have a set of 20 countries, where one country (A) introduced a tax for a specific good in 2005 and ...
0
votes
0answers
7 views

Interpreting the coefficients on age categories in Panel Regression

I am running a panel regression for 20 quarters of 311 local authorities. I am regressing their recycling rate on a series of variables (log income, log household size, log population density). I ...
0
votes
0answers
33 views

Simple Linear Regression Causal effect

Suppose that economic theory indicates a causal relationship between 𝑦 and 𝑥. As 𝑥 causes 𝑦 then the econometric model becomes 𝑦 = 𝛽0 + 𝛽1𝑥 + 𝑢 . In this instance, there is no need to include ...
0
votes
0answers
9 views

Chossing between high number of components in PCR vs linear regresion

Let's say my original data set has 18 variables. If the result of the cross-validation error is lowest on the 17 components of PCR is that a good indication that you most likely choose the ...
0
votes
0answers
13 views

In what cases (if any) does r^2 remain unchanged on adding a new variable? [duplicate]

Given that the r^2 changes with the addition of a new variable, are there circumstances where r^2 is unchanged? I can think of the case where the new variable is perfectly correlated with the one of ...
0
votes
0answers
10 views

Appropriate regression to predict >2 fractions?

Let's say I have demographic data on various classes and the proportion of students in the class who are black, white, etc. I'm trying to create a regression to determine features of the class that ...
0
votes
0answers
27 views

Regression analysis - suppressor variable?

Let's say you are conducting a multiple regression analysis examining the impact of X1 on Y. Let's also say you do not find a relationship until you control for X2. After controlling for X2, X1 ...
2
votes
2answers
72 views

Interpretation of linear regression interaction term plot

I am interested in looking at the relationship between plant productivity, temperature change and plant biomass change. I have run a linear model in R using the below equation for this with plant ...
0
votes
0answers
5 views

Compare samples with noisy data and maximums

Summary: I collected psychophysical data (i.e. yes/no responses to physical stimuli) testing the ability to feel a touch stimuli. I used a Bayesian algorithm to select the stimuli (30 trials per ...
0
votes
0answers
34 views

Expected value of a variable given a probability distribution

I have fitted some data with a normal and gamma distribution. But I need to find the expected value of my variable. For example is x is my data (mine is not normal) and fit them into a normal and ...
0
votes
0answers
11 views

Fully connected layer vs Multiple parallel dense layers for multivariate nonlinear regression?

I'm trying to tackle a multivariate nonlinear regression problem that takes around 20 inputs and outputs around 200. I have a set of known points and need to come up with a performant neural network ...
0
votes
1answer
20 views

Multiple correlation coefficient of a simple linear regression

I'm having a bit of a hard time understanding why the 'multiple correlation' coefficient within a simple linear regression (i.e., 1 predictor) isn't identical to the coefficient of determination. I ...
14
votes
3answers
282 views

What are the advantages of linear regression over quantile regression?

The linear regression model makes a bunch of assumptions that quantile regression does not and, if the assumptions of linear regression are met, then my intuition (and some very limited experience) is ...
0
votes
1answer
18 views

Predict Click Through Rates for Google depending on the Position

I'm given the task to calculate expected click through rates (CTR) for rankings of a given site in Google, using the data Google provides in their Google Search Console. What I get there is basically ...
0
votes
1answer
39 views

Statistical Learning/Classification problem (True or false)

I think the answer is false, but I'm not entirely sure how to put it into words. The problem is as follows: An electronic store wants to build a model to predict the number of televisions that it ...
1
vote
0answers
37 views

Poisson vs Gaussian GLM: which to use?

I'm going to provide a simulated case. However, the question is of a general nature (see end of the post). Let's suppose we have some data generated in this way: ...
1
vote
0answers
23 views

Analysis of Variance table (lm function)

I have a dataset dataset take has compnds1 (chemical compounds from 1st harvest), compnds2 (chemical compounds from 2nd harvest), method (=treatments, there are 4 treatments, 1 is control, 2 is hydric ...
1
vote
1answer
35 views

R: GLMM for unbalanced zero-inflated data (glmmTMB)

Study design: I have count data of snails per date, counted over many dates at sites, nested in localities. So, in each locality the snail counts come from several different sites, repeatedly ...
0
votes
0answers
21 views

interpretation of ordered logit regression with categorical independent variate

I would like to predict the quality of plants in certain area. I divided the quality of the plants in 5 groups; 0 to 5. And we've measured 5 different areas; control, 1, 2, 3, and 4. I ran a logit ...
0
votes
0answers
14 views

What does bandwidth in kernel regression mean?

here https://stat.ethz.ch/R-manual/R-devel/library/stats/html/ksmooth.html is bandwidth explained as "the bandwidth. The kernels are scaled so that their quartiles (viewed as probability densities) ...
-1
votes
1answer
49 views

Is it possible for regression model to predict patterns separately from data has multiple patterns?

I want to predict sold number of each drink(hot and cold) without clustering. I have data which contains sold number of hot and cold drinks. I trained it with linear model in scikit, and I thought I ...
0
votes
0answers
14 views

How best to model a complex function like Y=K^a*(cL+dM)^b (lowercase letters to be estimated)

Ok brains trust. I'm trying to model a production function which has an input that decays over 'distance' away from where production takes place. In other words, an input that is 1 unit away is ...
-1
votes
0answers
11 views

How to use race qualifying position to predict actual race position across time series data

I have a data set consisting of race qualifying positions and final race positions for circa 80 races (~8 races per year for ~20 years) for thousands of individuals. There is data missing at random. ...
1
vote
1answer
15 views

Why do you set 1 as intercept in linear regression model in python?

I'm learning linear regression in Udacity as a beginner. I know statsmodels.regression.linear_model.OLS() needs interception but why do you set ...
1
vote
1answer
21 views

Regression: within and between-subject variable interaction

I have a dataset with the following variables, which are measured between subjects (i.e. 1 measurement per individual): ID: subject identifier ...
0
votes
1answer
28 views

Dummy regression - p-value interpretation

Suppose I want to predict the quality of an essay as a function of how many essays a person produces in a year. Something like this: $quality = m_{0}\ (quantity/year) + k$ in which, $m_0$ is the ...
0
votes
0answers
16 views

Aggregating ROC AUC values of several Logistic Regression Models

I have a dataset that consists of six different segments. I have calculated a Logit Regression Model for each of those segments (binary response variable, 30.000 observations in total, 63 variables ...
1
vote
1answer
29 views

What minimization problem has this solution

Consider the following basic minimization problem \begin{equation} {\displaystyle \min _{\beta\in R^{n}}{\frac {1}{n}}\|Y-X\beta\|_{R^{n}}^{2}},\end{equation} with solution \begin{equation} {\beta^*=(...
2
votes
1answer
44 views

Interpreting regression coefficients when the outcome variable is an inverse hyperbolic sine function

I just learned that when there are zero or negative values, a good alternative to using a logged function is the inverse hyperbolic sine function. When using log transformation on the dependent ...
0
votes
0answers
16 views

Regression with non-unique values of dependent variable

I am wondering if I can estimate a regression, if the dependent variable y has duplicates, whereas all the independent variables (more than 15) are continuous and do not have any duplicates. In ...
2
votes
0answers
23 views

Extracting the linear equation for a circular-circular regression

I am trying to create a predictive model using a relationship found by the lm.circular function from the circular package. The ...
1
vote
1answer
36 views

R Calculate Deviance Residuals in a Logistic Regression [closed]

I am working on a project, where I want to build a function which performs a logistic regression but does not use the glm() function. I ran in a little bit of difficulties, when it comes to calculate ...
1
vote
0answers
12 views

Does multiplying a regression variable by a random variable with mean 1 affect the estimates

I'm dealing with a regression of the form $\log(Z)=\alpha\log(X) + \beta\log(Y) + u$, but instead of observing $Z$, I observe $Z'=aZ$, where $a$ is a random variable with mean 1. Does using these ...
2
votes
3answers
36 views

Linear Regression with dependent variables [closed]

I want to create a linear regression model using two variables, var $a$ and var $b$, and the coefficients are $w$ and $(1-w)$ respectively. So the output dependent variable $Y = wa + (1-w)b$. I am ...
2
votes
1answer
39 views

Do studentized residuals follow t-distribution

If we have the studentized residuals $$\frac{y_i - \hat{y_i}}{S \sqrt{1 - \frac{1}{n} - \frac{(x_i - \bar{x})^2}{S_{xx}}}}$$ given the assumptions that $e_i$ are iid $N(0, \sigma^2)$, does the ...
1
vote
0answers
33 views

How to test if regression coefficient = 1 [duplicate]

I’m attempting to run a regression and test whether the slope is equal to 1. Most statistical packages only test of it's equal to zero. Is there a way to bypass this ? I’ve SPSS and minitab and can ...
5
votes
1answer
114 views

Which gamma regression model to use for extrapolation?

I'm looking for a regression model which would satify these requirements: My target variable follows the exponential distribution, so to my understanding I should use gamma loss function. I have ...