# Multiple regression questions with answers

Recent questions in Multiple Regression
ferdysy9 2022-08-16

### Multiple linear regression with interactionI'm doing a multiple linear regression with interacting variables. I'll give you an example:$y$=value, ${x}_{1}$=material, ${x}_{2}$=weight, ${x}_{3}$=color${x}_{1}$ and ${x}_{2}$ are interacting variables but ${x}_{3}$ is not. Right now I'm using something like:$y={a}_{0}+{a}_{1}{x}_{1}+{a}_{2}{x}_{2}+{a}_{3}{x}_{3}+{a}_{12}{x}_{1}{x}_{2}+u$I'm pretty new to regression analysis so I wonder if there is any way to convert this formula to something like$y={a}_{0}+{a}_{1}{x}_{1}+{a}_{2}{x}_{2}+{a}_{3}{x}_{3}+u$so I can see how much effect ${x}_{1}$ and ${x}_{2}$ have simply by looking at ${a}_{1}$ and ${a}_{2}$? What I want to do is to just be able to look at the equation and understand how much 1 kg of extra weight adds in value without needing to calculate y. Splitting up the interaction term ${a}_{12}$ and distributing the effect over ${a}_{1}$ and ${a}_{2}$ if you guys understand what I mean. Maybe it's not possible or maybe there is a better regression method that is more suited for this, I don't know. I'd love to get some pointers from you guys.Thanks.

zabuheljz 2022-08-14

### variance of multiple regression coefficientsIf I consider universal kriging (or multiple spatial regression) in matrix form as:$\mathbf{V}\mathbf{=}\mathbf{X}\mathbf{A}\mathbf{+}\mathbf{R}$where $\mathbf{R}$ is the residual and $\mathbf{A}$ are the trend coefficients, then the estimate of $\stackrel{\mathbf{^}}{\mathbf{A}}$ is:$\stackrel{\mathbf{^}}{\mathbf{A}}=\left({\mathbf{X}}^{\mathbf{T}}{\mathbf{C}}^{\mathbf{-}\mathbf{1}}\mathbf{X}{\mathbf{\right)}}^{\mathbf{-}\mathbf{1}}{\mathbf{X}}^{\mathbf{T}}{\mathbf{C}}^{\mathbf{-}\mathbf{1}}\mathbf{V}$(as I understand it), where $\mathbf{C}$ is the covariance matrix, if it is known. Then, the variance of the coefficients is:VAR($\text{VAR}\left(\stackrel{\mathbf{^}}{\mathbf{A}}\right)=\left({\mathbf{X}}^{\mathbf{T}}{\mathbf{C}}^{\mathbf{-}\mathbf{1}}\mathbf{X}{\mathbf{\right)}}^{\mathbf{-}\mathbf{1}}$???How does one get from the estimate of $\stackrel{\mathbf{^}}{\mathbf{A}}$, to its variance? i.e. how can I derive that variance?

Jazmin Clark 2022-08-13

### Multiple regression degrees of freedom $f$-test.I'm finding conflicting information from college textbooks on calculating the degrees of freedom for a a global $F$-test on a multiple regression. To be absolutely clear, assume there are 50 observations and 3 independent variables. Can you please tell me the df for the numerator and denominator? I have found 2 sets of numbers in college texts. One indicating the numerator is equal to $P$, in this case 3, and alternatively $P-1$. For the denominator I am finding $n-p$,which in this case would be 47, and alternatively, $n-p-1$. Perhaps I am misunderstanding the material and there are circumstances when one vs. the other formula applies. I've not done any regression analysis in more than 25 years and now find I'm stuck on a Christmas vacation project I wanted to do with my son. So any help that would explain, in a gentle way, (I can't get through the quadratic explanation, or something that will bury me in calculus) how to determine the df would be appreciated. Concrete examples would be very beneficial. Also, if there is a good practical walk through of multiple regression/Anova that will show some examples and explain concepts (but please do not recommend Regression for Dummies) I'd appreciate a referral to that as well. Thanks for your help.

Crancichhb 2022-08-13

### Multiple linear regression ${b}_{0}=0$I am trying to calculate the coefficients ${b}_{1},{b}_{2},...$ of a multiple linear regression, with the condition that ${b}_{0}=0$. In Excel this can be done using the RGP Function and setting the constant to FALSE.How can this be done with a simple Formular?Thank you in Advance!

cofak48 2022-08-11

### Find the constrained least-squares estimator for a multiple regression modelConsider the multiple regression model$Y=X\beta +ϵ$with the restriction that $\sum _{l}^{n}{b}_{i}=1$I want to find the least squares estimator of $\beta$, so I need to solve the following optimization problem$min\left(Y-X\beta {\right)}^{t}\left(Y-X\beta \right)$$s.t.\sum _{l}^{n}{b}_{i}=1$Let's set$L=\left(Y-X\beta {\right)}^{t}\left(Y-X\beta \right)-\lambda \left({U}^{t}\beta -1\right)={Y}^{t}Y+{\beta }^{t}{X}^{t}X\beta +-2{\beta }^{t}{X}^{t}Y-\lambda \left({U}^{t}\beta -1\right)$where U is a dummy vector of ones (and therefore ${U}^{T}\beta =\sum _{l}^{n}{b}_{i}$).Take derivatives$\frac{d}{d\beta }=2{X}^{t}X\beta -2{X}^{t}Y-\lambda {U}^{t}=0$$\frac{d}{d\lambda }={U}^{t}\beta -1=0$So from the first equation we can get an expression for $\beta$, but what should I do with the $\lambda$? The second equation doesn't seem to be useful to get rid of it.

Bernard Boyer 2022-07-19

### Contribution of each variable in multiple linear regressionWhat will be the best measure of the contribution of a variable in multiple linear regression? I was thinking of using the coefficient ratio as a marker of a variable's contribution.For example:If the equation is${Y}_{predicted}={a}_{1}{X}_{1}+{a}_{2}{X}_{2}+{a}_{3}$Then ${X}_{1}$'s contribution can be written down as:$\frac{{a}_{1}}{{a}_{1}+{a}_{2}+{a}_{3}}$Is there some other method possible to write down the contribution. Since in this case if any coefficient is negative, there is a possibility that a variable's contribution exceeds $100\mathrm{%}$

Marisol Rivers 2022-07-18

### Multiple regression problems (restricted regression, dummy variables)Q1.Model 1: $Y={X}_{1}{\beta }_{1}+\epsilon$Model 2: $Y={X}_{1}{\beta }_{1}+{X}_{2}{\beta }_{2}+\epsilon$(a) Suppose that Model 1 is true. If we estimates OLS estrimator ${b}_{1}$ for ${\beta }_{1}$ in Model 2, what will happen to the size and power properties of the test?(b) Suppose that Model 2 is true. If we estimates OLS estrimator ${b}_{1}$ for ${\beta }_{1}$ in Model 1, what will happen to the size and power properties of the test?-> Here is my guess.(a) ${b}_{1}$ is unbiased, inefficient estimator. (I calculated it using formula for "inclusion of irrelevant variable" and ${b}_{1}=\left({X}_{1}^{\prime }{M}_{2}{X}_{1}{\right)}^{-1}{X}_{1}^{\prime }{M}_{2}Y$ where ${M}_{2}$ is symmetric and idempotent matrix) Inefficient means that it has larger variance thus size increases and power increases too.(b) ${b}_{1}$ is biased, efficient estimator. (I use formular for "exclusion of relevant variable" and ${b}_{1}=\left({X}_{1}^{\prime }{X}_{1}{\right)}^{-1}{X}_{1}^{\prime }Y$) Um... I stuck here. What should I say using that information?Q2.Let $Q$ and $P$ be the quantity and price. Relation between them is different across reions of east, west, south and north, and as well, for different 4 seasons. Construct a model.-> Actually, I don't know well about dummy variables. So any please solve this problem to help me.

anudoneddbv 2022-07-16