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 [residuals]

The residuals of a model are the actual values minus the predicted values. Many statistical models make assumptions about the error, which is estimated by the residuals.

0
votes
1answer
19 views

Why is the dot product of x and e equal to zero with least squares regression? [duplicate]

The Wikipedia entry for Degrees of freedom (statistics) has a section, "Of residuals," that discusses the two equations that constrain the residuals: $\hat{e_1} + ... + \hat{e_n} = 0$ and $x_1\hat{...
2
votes
0answers
21 views

Significance of the parameter fitdf in Box.test

When reading ?Box.test, I learned about a rarely mentioned parameter fitdf, which specified the "number of degrees of freedom to ...
1
vote
1answer
48 views

Error sum of square for OLS estimator

The error sum of squares is defined as: SSe(𝛽)=(y-X𝛽)'(y-X𝛽) (1) I want to show that for the OLS estimator of 𝛽̂ is ...
0
votes
0answers
18 views

GAM model residuals

I have a huge problem with my model. I did a GAM Model with negative binomial distribution (with mgcv library). Now I want to do an overdispersion test but I think that this doesn't exist for ...
3
votes
1answer
31 views

Residual Plot of multiple regression centered on (0,2)

There's a lot of great questions and answers here about funny-looking residual plots. Mine isn't - it's kinda normal, except it's centered on (0, 2) [Cartesian coordinates], not on (0,0). Any idea ...
0
votes
0answers
9 views

Confidence in model selection

I have a Gam model built for a time series study over 15 study sites for ecological analysis. I have run the model and I have a significant intercept, ecologically sound significant results, 55% ...
1
vote
0answers
23 views

Estimating parameters of multivariate regression using the maximum likelihood method with a uniform distribution of residuals?

Representation of regression in a matrix form: $$Y = XA + E,$$ where: $X$ - independent variables, $Y$ - dependent variables (observations), $E$ - errors, which have a uniform distribution, $A$ - ...
0
votes
0answers
15 views

Conflicting residual diagnostics for GLMM for binary data: zero-inflation

I fitted a mixed logit model with crossed random effects in lme4_1.1-21::glmer to some experimental binary data. The maximal random-effect structure justified by ...
0
votes
0answers
12 views

Extract covariate adjusted dependent variable from linear regression model?

I want to adjust a continuous (dependent) variable for two independent variables (1 categorical, 1 continuous) and then use the residuals + intercept for plotting by another categorical variable. Is ...
0
votes
0answers
7 views

error residual identical for within subject ANOVA and between subject ANOVA with double the sample size

I noticed something interesting while playing around with data. If I conduct a 2-by-2 within subject ANOVA with 20 subjects my sum of square residuals look like this: ...
0
votes
0answers
28 views

Model residuals vs test “residuals” correlation

Suppose I have an autoregressive univariate model fitted with a given period, so we obtain residuals produced in that process. We want to know the correlation of that residuals with other variables of ...
0
votes
1answer
33 views

Interpreting qq plot from ARIMA residuals

Im trying to undestand this qqplot from arima residuals but im a bit lost about the underlying distribution, concretely I don't now how to interpret the tails.
0
votes
1answer
43 views

Is the difference between the residual and error term in a regression just the ability to observe it?

According to what I read online, the error term and the residual are often interchangeable. Please let me know if my understanding below is correct: However, the difference is that the error term is ...
0
votes
0answers
14 views

Need clarification for different notations and corresponding formulas in Linear Regression

1) First of all, can anybody clarify, whether my notations correspond to the correct formula. As I found different descriptions/notations for different formulas, I tried to put these Information ...
0
votes
0answers
22 views

Post hoc for Levene test

I have a problem regarding my data analysis. One of my hypothesis is basically that my groups will differ in terms of spread of the scores, indicating that there would be a difference in extremity ...
0
votes
1answer
40 views

Assumption multiple regression: normality of residuals

I want to run a multiple regression analysis for a given dataset in SPSS. However, the dataset violates the assumption of normality of residuals, as depicted in the picture. The values for the ...
0
votes
0answers
41 views

How to make sure if the residuals are normally distributed? [duplicate]

Hello, I have a fairly big dataset containing 11000 data points. I am doing a ANOVA for my traits. But before that I have to make sure if the residuals are normally distributed or not. So, I did a ...
1
vote
0answers
27 views

Plotting Residuals vs Predicted Values

In textbooks, residual plots are described as have predicted (fitted) values on the x-axis, with the y-axis being the difference between the predicted and observed values. However, I'm having trouble ...
0
votes
0answers
20 views

What is the residual, seasonal component in time-series decomposition represents?

I am doing time series analysis on the below dataset- Here's link This is what I got on the decomposition of the dataset in python- Well, I know the meaning of every word i.e- The trend represents ...
0
votes
0answers
18 views

Residuals for a JAGS logistic regression model

I have the following simple logistic regression model: ...
0
votes
0answers
13 views

How to calculate the critical DmodX value from a PCA?

R has a DModX Calculation for PCA. I've seen references in some online texts that a critical DModX can be used to flag samples which are significantly poor fit to the model. The R documentation states ...
0
votes
1answer
18 views

How to compute residuals in multiple linear regression model

The residual can be seen as the distance between the observed data and the predicted data In an a simple regression model (i.e. $x\in \mathbb{R}^{n\times m}$, $m = 1$, $y \in \mathbb{R}$) we have $\...
0
votes
0answers
12 views

non homogonous data and interaction

I have an experiment design with: Variable 1 - 2 levels Variable 2 - 3 levels And demographic information collected about my participants: Demographic 1 - 2 levels Demographic 2 - 3 levels ...
1
vote
1answer
43 views

High Correlation Between Residuals and Dependent Variable

I am working with a data set of roughly 1,500 obs. The model I built is a double-log GLM model to estimate price elasticities. During testing, I discovered the residuals and the dependent variable are ...
0
votes
0answers
18 views

Can differences in predicted values before and after events be detected by comparing residuals?

My data consists of 30 variables taken together at irregular intervals. They are taken at least 200 times each for at least 100 different subjects. I am assuming that 5 of the variables can be modeled ...
1
vote
0answers
57 views

When/why not to use studentized residuals for regression diagnostics?

Consider a linear regression $$ y=X\beta+\varepsilon. $$ Residuals $e:=y-X\hat\beta$ are often used as substitutes for the unobserved model errors $\varepsilon$ for validating assumptions such as ...
1
vote
1answer
33 views

OLS loss function 3-d surface plot

I was trying to plot the OLS loss function as a function of coefficients $\beta_0$, $\beta_1$. As far as I know it should be a convex function with one local minimum which is also a global minimum. I'...
1
vote
0answers
20 views

Residuals of 1st regression as independent variable , “bad practice”?

I have an independent variable [Y] that I want to do predict based on the "n" variables X1, X2, ..., Xn. So, I run "n" regression like: Y~X1 Y~X2 ... Y~Xn From the "best" regression, I want to use ...
0
votes
0answers
20 views

Two group clustering in residuals - not sure how to fix

My only really significant finding in this study has strange residuals - two clusters. It's a study of the treatment effect of education on psychological capital pre vs. post-test, so I'm assuming the ...
0
votes
0answers
26 views

partial plots or added variable plots

Suppose we have the following regression model: y = b0 + b1*X1 + b2*X2 + error1 (1) The partial regression plot or added variable plot of x1 is (i.m.h.o.) constructed as follows: regress y on ...
0
votes
1answer
40 views

Do OLS residuals tell us anything about the distribution of the error term? [duplicate]

I'd like some intuition on a question that has long confused me. Suppose we have a data-generating process $$y_i = x_i' \beta + \varepsilon_i $$ where $\mathbb{E}[\varepsilon_i] = 0$, $\varepsilon_i ...
0
votes
0answers
10 views

Coefficient of variation and residual standard deviation

From my knowledge, coefficient of variation and residual standard deviation are highly correlated. Such that if we find a significant change in one, we will find a significant change in the other. In ...
3
votes
0answers
169 views

Failure to replicate calculation of PCA residuals in linear regression with heteroscedasticity

In their preprint, Rocha et al. suggest a new type of residual for linear regression models with heteroscedasticity. They call their new residual PCA residuals. I have tried to replicate some of their ...
1
vote
0answers
26 views

Linear regression diagnostics

I spent years reading articles, text, etc about the use of residuals to determine model violation, but I have a hard time telling if they actually have occurred and how much the violation matters. I ...
2
votes
1answer
50 views

How can I test for autocorrelated errors in logistic regression?

I'm doing a Bayesian logistic regression $Y \sim X$ where my predictor $X$ is a count observed over time. So $Y$ and $X$ are each $m x n$ matrices where $m$ is the number of subjects and $n$ is the ...
7
votes
2answers
91 views

In linear regression, why are raw least squares residuals heteroskedastic?

In my course notes on a regression course with regards to the detection of heteroskedasticity there's the following quote: "Because the least-squares residuals have unequal variances even in the ...
1
vote
0answers
18 views

Ljung-Box Test in finite sample proof [duplicate]

Initially I have seen that in order to analyze residuals for finite sample, Ljung - Box is defined as $n(n+2) \sum_{n=0}^h p_k^2/(n-k)$ where $n$ is the sample size, $p_k$ is the sample ...
2
votes
1answer
41 views

Are these the correct residuals to test for normality for a within-subjects 2-way anova?

I have data of an experiment where subjects performed a task under 4 conditions (A1B1, A1B2, A2B1, A2B2, where A1/A2 are the levels of factor IV1 and B1/B2 those of ...
1
vote
1answer
33 views

What is the meaning of “unexplained” in unexplained variance or residual sum of squares?

I understand the formula of RSS and RSE but it confuse me every time I read unexplained variance. I don't understand why the term unexplained is use.
3
votes
1answer
44 views

Does nlmer() from lme4 assume normal distribution of residuals and random effects?

I am currently reading this paper , according to which Linear mixed-effects (LME) (Laird & H.Ware, 1982) and nonlinear mixed-effects (NLME) models (Pinheiro & Bates, 2000) are ...
1
vote
1answer
50 views

Checking error covariances between indicator variables in sem/cfa

I'm learning SEM/CFA, and am currently following Beaujean's (2014) book on using lavaan. In the chapter where he talked about CFA and the number of indicator variables to have to ensure the model ...
1
vote
0answers
35 views

Squared internally studentized residual over $n-p$ is Beta distributed

Assume a regression model $y = X \beta + \varepsilon$ with $n$ observations and $p$ parameters. Let $r_i$ be the $i$-th internally studentized residual: $$r_i = \frac{e_i}{\sqrt{\hat{\sigma} (1 -h_{ii}...
3
votes
1answer
98 views

assessing glmmTMB hurdle model fit using DHARMa scaled residual plot

My model glmmTMB(y~fixed1+fixed2+fixed3+fixed4+(1|random),data=df,ziformula~., family=list(family="truncated_nbinom1",link="log")) The response variable (<...
1
vote
0answers
103 views

How partial residuals in “plot.gam” are calculated?

Take mtcars as an example. I build a GAM model between mpg (dependent variable) and disp and ...
0
votes
0answers
19 views

What are residuals with regards to PCA? [duplicate]

I understand residuals intuitively in terms of linear regression as "the error in prediction". Mathematically I've seen residuals given by $$\epsilon = y - \hat{y}$$ where $y$ is the true value and $...
0
votes
0answers
47 views

Estimation-based bootstrap using GARCH(1,1) and Rugarch

I try to replicate the methodology proposed by Freedman and Peters (1984a, 1984b) which was applied in the famous paper by Brock, Lakonishok and LeBaron (1992) to generate many artificial log return ...
0
votes
0answers
21 views

Can someone explain the difference of mean and linear bias in residual analysis?

I am struggling in understand the difference between mean and linear biased. What does it mean the a regression has mean biased or linear biased? How do I interpret it?
0
votes
0answers
14 views

Question about the correlation between residual/error and regressors [duplicate]

In multivariate regression: Why can the sample correlation between the error term and a regressor be ≠ 0, but the sample correlation between the residual and a regressor has to be = 0?
1
vote
1answer
53 views

Residual Analysis assumptions for non-linear regression

I understand Regression analysis relies on the following assumptions about the residuals: Normally Distributed (normal plot of residuals) Be independent of each other (random and data must be time ...
0
votes
1answer
81 views

What does residual map explain?

I am modelling count data of migration flow (from origin to destination) with several explanatory variables using negative binomial regression. ...