Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [multiple-regression]

Regression that includes two or more non-constant independent variables.

0
votes
3answers
42 views

Multiple regression with dummy variables and interaction term

We have done a multiple regression analysis to see how gender and experience affect salary. We used a dummy variable for gender and then we also added the interaction variable (female work experience)....
0
votes
0answers
11 views

How to apply PCA using statsmodels library [on hold]

I am using statsmodel for developing linear regression model. I want to use PCA using the same statsmodels library. How to do it ? Is it advisable to do PCA using SKlearn and then doing regression in ...
1
vote
0answers
17 views

Statistical test to compare polynomial terms between two separate regressions

Let's say I have two OLS specifications with different IVs (R notation): lm(outcome ~ IV_1 + I(IV_1^2)) lm(outcome ~ IV_2 + I(IV_2^2)) I theorize that the ...
0
votes
0answers
12 views

R Mixed-Effect Models for 2-way Repeated Measures Design with more than 2-levels in each factor

Background: I am running an experiment with the following parameters. Design: 2-way Repeated Measures Design (as of right now there are NO between-group/grouping variables Dependent Variable: A ...
0
votes
0answers
29 views

Multiple regression or something else? [on hold]

So I am really new to stats and have this problem. My teacher can't explain this properly so I am really lost. So I have 2 studies which would be done one after another. The idea is to use variables ...
7
votes
1answer
204 views

Linear regression minimising MAD in sklearn

The standard sklearn linear regression class finds an approximated linear relationship between variate and covariates that minimises the mean squared error (MSE). Specifically, let $N$ be the number ...
0
votes
0answers
52 views

Unable to remove heteroscadasticity

This is my model: lm(PCTUI~year+statefips+factor_agecat+factor_sexcat+factor_racecat+factor_iprcat, data = train) I have factorized the categorical variable. ...
0
votes
1answer
14 views

Is conditional r-squared ever zero?

I am using multivariate auto regressive modeling (MAR) to assess a complex data set (MAR is a form of vector auto regressive modeling, VAR). The output of the MAR method is >1 response variables and >...
1
vote
1answer
27 views

If diagnostics for multiple linear regression are ok, are diagnostics of the component variables needed?

This is a follow-on question from here. I received two conflicting answers to the question posed in the title of this post. The diagnostics of the multiple regression looked okay (see link), but it ...
1
vote
2answers
43 views

Rules of thumb for partial residual (component + residual) plots as diagnostics for linearity?

Here are the standard R diagnostic plots of a multiple linear regression model that includes an autoregressive term at lag-1 (i.e. AR(1)). I have logged & z-scored my input data. Ben Bolker says ...
0
votes
0answers
10 views

Variable as confounding if it influences other factors in opposite directions?

I examine the relationship between population density (PD) and the insurance density (ID) taking into account different market exploitations (ME) of an insurance company in municipalities. The ...
0
votes
0answers
30 views

Combining independent variables in linear regression - does it make sense?

I try to model energy consumption for a set of about 50 relatively similar production facilities. I have annual data of energy consumption and 3 independent variables that - from a technical point of ...
0
votes
0answers
18 views

What is the consequence from building polynomial regression with multiple ind. variables?

I'm exploring polynomial regression. I understand how to execute it for cases with one independent variable. What about cases with multiple independent variables? I'm working with the boston housing ...
0
votes
0answers
14 views

What statistical to use - variability between but not within

I have a data set where each line represents a participant's response to a series of questions (e.g., attitudes towards democracy, life satisfaction). Participants were recruited from different ...
0
votes
0answers
5 views

In which order should my hierachal multiple regression blocks be conducted

I am using multiple regression to look at the effect of colour processing memory on cognitive tasks. Ive been told out of the four predictors there are 2 that the researchers are interested in. ...
1
vote
0answers
27 views

Degrees of freedom in OLS regresison vs Bootstrap

I understand that in OLS, the degrees of freedom for estimating the variance of the residuals is n-q-1. We loose q+1 degrees because they are "used" to analytically determine the q parameters and 1 ...
2
votes
1answer
45 views

Does $\hat{\beta}=(X′X)^{−1}X′ \ Y$ simplify further?

As far as I know $(AB)^{-1}=B^{-1}A^{-1}$ and matrix multiplication is associative so: $$(X′ X)^{−1}X′=(X^{-1})(X')^{-1}(X')=X^{-1}.$$ What am I doing wrong?
0
votes
0answers
11 views

How can i Find $se(\hat β)$ -Regression Analysis

How can I find $se(\hat β)$ if I know that $\hatβ=25.444$? We also know that $S=5.368$ and $S^2=\dfrac {SEE}{n-k-1}$ where $n=20,k=3$ From t-test, we know that $t=\dfrac {\hat β_j-β_j}{se(\hat ...
1
vote
1answer
29 views

Linear regresson with four values as input and two values as output

I have the following problem for a personal project of mine: I am solving a system of two differential equations that has 4 changing parameters. The output are two vectors of numbers. Let's say I am ...
0
votes
0answers
14 views

Can we mix the algorithm?

The question comes from when I was wondering about the cross-validation, finding out the best algorithm. Then I got the question like if this model did a better job than the other, can the ...
0
votes
0answers
12 views

What information can be extracted from plotting two variables of a multiple logistic regression against the prediction?

I have a multiple logistic regression model that has the form of: disease ~ treatment + x2 + x3 + x4 + x5 Where disease can take values 1 and 0 (diseased or not ...
0
votes
1answer
24 views

Application of LASSO , Ridge, PLS in feature selection of spectral data

The meatspec data in faraway package is spectral data with 100 features .(215 *101). Use of LASSO over ridge and PLS gives better performance (RMSE based) But none of the features are removed ( no ...
0
votes
0answers
30 views

How do we compute OLS coefficients from Sum of Squares in multiple linear regression?

Suppose we have a variable y which is dependent on 2 variables say x1 and x2. Then I can understand how we can compute Sum of squares due to x1 and x2. For instance we may have Type I Sum of squares ...
0
votes
0answers
32 views

Multiple correlation in the sampling variance of slope coefficient in multiple regression

Let's say we have the following multiple regression model, $$Y_i = \alpha + \beta_1 x_{i1} +\beta_2x_{i2} + ... + \beta_kx_{ik} + \varepsilon_i$$ with $ \varepsilon_i$ is $iid$ ~ $N(0,\sigma_{\...
3
votes
0answers
34 views

regression analysis with both slope and value data

I have measured data $\{x_i, y_i, y'_i\}$, to which I would like to fit a polynomial $y=a x^2 + bx + c$ and $y' = 2ax + b$. It occurs to me that the regression problem of fitting $y=a x^2 + bx +c$ to ...
1
vote
0answers
16 views

Statistical adjustment for regression

I already checked out the answer to this: enter link description here It is not a duplicate and that did not answer my question. I wanted to try to ask a different question regarding a similar ...
0
votes
0answers
21 views

Adding regularization to an objective function when not using gradient descent

Using a simple example if I have a model: $$y = \beta_1 X_1 + \beta_2X_2 + {\rm error}$$ with cost function $${\rm Cost}= RSS + \alpha (\beta_1 + \beta_2)(\beta_1 + \beta_2)$$ If we were to use ...
0
votes
1answer
27 views

How to handle and test categorical dummy variables when interested only in certain levels?

I want to build a multiple linear regression model. I want to test the effect of a nominal variable with 10+ levels, but I am interested in testing only the effect of 2 of them. 1st Question: How ...
0
votes
0answers
21 views

How can I improve my sklearn linear regression?

I'm carrying out a regression problem where I am trying to predict quality based on other attributes of wine. (The quality data is the result of the median of 3 wine tasting experts rating each wine ...
1
vote
0answers
10 views

Why would someone use regression analysis to compute weighted variables?

I stumbled upon a measure that uses multiple regression analysis to compute weighted variables, instead of factorial analysis or other more common methods. I have a feeling this is just bad statistics ...
2
votes
0answers
35 views

How should I interpret the coefficient in the output of this Logistic Regression? [duplicate]

This is a binary model that my colleagues and I developed that regards a connection between the satisfaction with air (dependent variable) and overall satisfaction with public transport (covariate). I ...
0
votes
0answers
14 views

Multivariate linear regression - optimizing one coefficient at a time

I have a few questions about solving the multivariate linear regression problem: What is the most popular numerical method used to get the coefficients from multivariate linear regression? I assume ...
0
votes
0answers
40 views

Why is the value of vif from $(X'X)^{-1}$ not matching the result?

The diagonal elements of matrix $C = (X'X)^{-1}$ are $C_{jj} = \frac{1}{1-R_{j}^{2}}$ (which is nothing but the vif) of $x_j$ where $j = 1, 2, 3, ..., n$ and $X$ is a $n\times p$ matrix and $R_j^2$ ...
2
votes
2answers
63 views

How do I forecast time series for which the range of residuals is increasing over time?

I have gathered 25 years worth of monthly timeseries data. The value of Y (dependent variable) has seasonality of 10 months. I have used polynomial equation to model seasonality cycle. The trend ...
1
vote
0answers
33 views

Functional Forms of Independent Variables

If our objective is to ascertain the relationship (specifically, sign and significance of Beta coefficient) between independent variables and dependent variable in an OLS regression (cross sectional ...
0
votes
0answers
18 views

thin-plate spline projection pursuit regression?

Is projection pursuit regression limited to univariate smoothing splines only? I am essentially looking for a multivariate ppr method. Is there such a method that searches for the most curved surfaces ...
0
votes
0answers
16 views

MultiTaskLasso vs. Lasso with dummies

I am trying to do a Lasso regression, where one of the features is a categorical string e.g. suppose we have Price,Year,Make for a car. One option would be to use one-hot encoding for Make, and do ...
0
votes
1answer
35 views

Different regression coefficients from statsmodels OLS API and formula ols API

I work at a relatively large Swedish retail company where I am currently performing initial linear regression in order to understand the linkage between dependent variable store sales (number of ...
0
votes
1answer
27 views

Test to compare on an ordinal scale, two groups of data that have covariates

I have two (Test and Control) groups of data. Data in each group is divided into 10 (ordinal) period. In each of these periods, number of observation ranges anywhere from 22-53. The assumption is that ...
0
votes
0answers
33 views

two different interpretation of regression coefficient of continuous variable in presence of a categorical covariate

I have the following model: logistic regression: outcome ~ b1*age + b2*smoker + b3*age:smoker smoker has two levels: non-smoker, smoker age is a continuous variable likelihood ratio test shows ...
1
vote
0answers
34 views

How to interpret goodness of fit after a log transformation

below I have 2 variables x and y. I have reason to believe they move together in percentages rather than absolute terms. ie if one goes up 10 % the other will go up 10%. For this reason, I have taken ...
1
vote
0answers
22 views

Heteroskedasticity correction

After I ran a bptest and I detected heteroskedasticity, I want to correct for it. What is the difference between the functions HC1, HC2 and HC3 in R? bptest(model2) model3 <- coeftest(model2, ...
2
votes
0answers
38 views

Dealing with non-linear variable in multiple linear regression model [duplicate]

I have a multiple linear regression model which should explain the variation store price elasticities using consumer characteristics of the market area surrounding a store. Therefore, my dependent ...
0
votes
0answers
20 views

Approximate prediction interval in linear regression

Suppose we have a linear regression model of the following format : $$ y(x) = \beta_0 + \beta_1 x_1+ \beta_2x_2+\beta_3x_3+\epsilon$$ We know that the prediction interval associated with a level $\...
0
votes
0answers
45 views

Identifying treatment selection and outcomes with logistic regression

We have 300 patients who underwent either surgery or a non-surgical treatment. We listed serious complications, regardless of what treatment they received. Other descriptive measures include age, sex, ...
1
vote
0answers
25 views

$\mathbb{R}^m\to\mathbb{R}^n$ regression

The naive approach to a $\mathbb{R}^m\to\mathbb{R}^n$ regression problem is simply to solve $n$ distinct $\mathbb{R}^m\to\mathbb{R}$ regression problems. However, suppose that the output of the ...
0
votes
1answer
18 views

Difference in results when using full dataset vs subset in lmer

I have a dataset with the number of different species across multiple years and locations. I'm interested in seeing how abundance of each species has changed over time in each place. My data looks ...
1
vote
1answer
52 views

Fixed effects at industry & year level for firm-level data

Various papers that study firm-level effects include dummy variables at the industry & year level. From what I understand, calculating fixed effects requires panel data, i.e. (for firm-level data)...
0
votes
0answers
9 views

Estimate expected power on a wind turbine based on other nearby wind turbines

I'm looking for a reliable way to estimate the power that a wind turbine should be producing, based on the power that its neighbours are producing. We use this to identify turbines that are ...
1
vote
0answers
22 views

In a gamma regression, how can i interpret coefficients?

My question is pretty simple, i have done a bayesian gamma regression with an inverse link, so: $\eta_i$=$\beta_0+\beta_1x_{i1}+\dots+\beta_px_{ip}$ < using an inverse link, mu is the ...