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
0answers
6 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 ...
1
vote
0answers
25 views
+100

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
23 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 ...
1
vote
0answers
28 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
12 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
39 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
25 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
28 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
42 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
22 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}...
1
vote
0answers
20 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 (y) is e.g. kilos of wheat seeds planted per ...
1
vote
0answers
28 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
18 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
16 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
16 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
11 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
26 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
39 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. ...
2
votes
1answer
60 views

Residual Bootstrapp based on GARCH models with student-t distributed innovation

I want to generate 500 simulations of my original return time series. My original return series (n = 4000) exhibits significant serial autocorrelation at lag 1 & 2, is non-normally distributed (...
3
votes
2answers
183 views

Why does this expression simplify as such?

I'm reading through my professor's lecture notes on the multiple linear regression model and at one point he writes the following: $$E[(b-\beta)e']=E[(X'X)^{-1}\epsilon\epsilon'M_{[X]}]. $$ In the ...
0
votes
0answers
14 views

Model Deviance lower than Residual Degree of Freedom

I am trying to calculate the Variance inflation factor (VIF) for a Generalized Additive Model (GAM). The GAM model contains both constant terms and splines. The VIF is defined as Deviance of model ...
2
votes
0answers
27 views

Working out a metric for the goodness of fit for 2D data in time

I have a dataset which I wish to optimise a fit for. The data might look something like I.e. orange is t=0, blue is t=1, and green is t=2. I wish to find a fit. I have a differential equation ...
0
votes
0answers
14 views

Account for covariate after predictor in ANCOVA?

I've been thinking about ANCOVA a bit and I didn't find anything on this particular issue. One of the most critical assumptions is that the predictor is not correlated with covariate (assumption of ...
0
votes
1answer
18 views

Formula for deviance residuals for Poisson model with identity link function?

I understand the deviance residuals $r_D$ for a Poisson GLM with log link function are given by $r_D = \mu_{ij} \log(\mu_{ij}/\hat{\mu}_{ij}) + (\hat{\mu}_{ij} - \mu_{ij})$ I was wondering though ...
0
votes
1answer
30 views

linear regression backwards elimination

Suppose we have to find the best predictive linear model for the price of residential houses in a certain area from a set of predictors such as sqft, number of baths, etc. Also, suppose that we ...
0
votes
0answers
9 views

Interpreting Linear Trends in Residuals of Mixed Effects Model

I've created a mixed effects logistic regression model using proportional data, and I'm having trouble interpreting my residual plot. I've been taught that when looking at the residuals, I should be ...
1
vote
0answers
26 views

GARCH model with t-innovations

I am modelling a time series with GARCH model with t-distributed error using RUGARCH package. My model is specified as: ...
1
vote
0answers
120 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 ...
2
votes
1answer
65 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 ...
0
votes
0answers
4 views

Finding expected range of values in multi variable reduction

For a least-squares reduction to find expected values for $a,b,c,d, ...$ from a number of equations like: $a + b = n_1$ $a + c = n_2$ $b + d = n_3$ $c + d = n_4$ ... My question relates to ...
0
votes
1answer
75 views

Proving an identity involving $E(e_i^2)$ in simple OLS

Once expressed the simple OLS residual $e_i$ as a weighted sum of the noise terms: \begin{equation}e_{i}=\sum_{j}\left(\delta_{i j}-\frac{1}{n}-\left(x_{i}-\overline{x}\right) \frac{x_{j}-\overline{x}...
1
vote
0answers
14 views

testing normality for a two way anova, residuals as well as each sample? [duplicate]

to test a two way ANOVA do you have to test each sample for normality as well as normality for the residuals?
2
votes
2answers
73 views

Why does the OLS-intercept not just “de-mean” the residuals of the same model without intercept?

The answer here explains, why the residuals of an OLS-regression have mean zero if an intercept is included. Problem: Intuitively, i would assume that including an intercept just "de-means" the ...
1
vote
2answers
53 views

Normality vs normality of residuals

I am currently trying to perform a hypothesis test on the difference between four means. Initially I was trying to use ANOVA but then realised I may not meet the assumptions for this test and may need ...
0
votes
0answers
8 views

Residuals unbiased but unbalanced

I have a couple different models I have been working with to predict order quantities for customers. One is a GLM, and one is an ARIMA model. For both models, the residuals sum to zero, but they are ...
1
vote
0answers
10 views

SARIMA residual analysis question

I am new to ARIMA and here I have a question about residual analysis. My data is seasonal ARIMA data, and after fitting a non-seasonal difference and a seasonal difference to my data, I get the ...
0
votes
0answers
39 views

hdbscan on numerical AND categorical data (of high dimensionality)

I performed regression on a dataset of motorbikes, where I try to explain their price based on some numerical features (hp, ccm, age, km) and also their model, which is categorical with high ...
1
vote
1answer
38 views

Residuals still zero inflated after running zero-inflated poisson mixed effect model with glmmTMB

I am working with observational data which has a right skew in the dependent variable. This is a mixed effect model with a poisson distribution as based on discrete data. After finding the residuals ...
0
votes
2answers
45 views

Is it sound to use a regression model to identify excessive medication dosage for individual patients?

Let's say I wanted to identify individuals who are taking an excessive amount of the blood clotting drug warfarin relative to their peers. To do this, I'm considering building a regression model that ...
0
votes
0answers
20 views

How to interprete this Quantile Plot?

I did a multiple regression analysis for several production sites with energy consumption as dependent variable, and 2 other independent predictors (Floor space, production). When checking the ...
0
votes
0answers
20 views

What to do when ACF and PACF plots of the residuals show significant lags?

I have a binomial glm modelling a proportional RV against a categorical predictor. The formula looks like this ...
4
votes
2answers
71 views

Change variable to log transformed or keep original?

A log transformation of the dependent variable is sometimes recommended as a remedy for some cases of non-normal distribution of residuals after fitting a linear regression model. What is the proper ...
1
vote
0answers
24 views

How can I determine, in what extent the fit to experimental data is good in Matlab?

I have experimental spectrum in which y-axis is intensity values, and x-axis is frequency values. Int - array of experimental intensities (y-axis). w - array of frequencies (x-axis). I know the view ...
2
votes
1answer
39 views

What if errors (residuals) follow other distribution rather than linear regression?

At first, sorry for the bad english. I'm not good at english because I'm a Korean. Recently, I'm studying linear regression. I've heard that errors always follow normal distribution because they are ...
1
vote
1answer
31 views

Which statistical test to use when some residuals are normal and some are non-normal?

I have some response data from an experiment which uses appraisal methods to assign scores based on various attributes. The scores are awarded (in part) from visual observations of biological ...
0
votes
0answers
27 views

Estimating likelihood from the Residual Sum of Squares

I'm start studying Bayesian statistics, but I've found that I'm having troubles with the likelihoods. Let's say that I have a vector of observations $y$ and I want to calculate how likely it is $y$ ...
0
votes
0answers
27 views

why do residuals of the model show heteroscedasticity when plotted against time

Following up on question Dealing with heteroscedasticity in mixed models I collected crop yield data for many years across multiple locations, which are nested under provinces and some associated ...
0
votes
0answers
31 views

How to read Partial Regression Plot?

Partial regression plot is a plot: • X's: residuals from model X[k] ~ X[-k] • Y's: residuals from model Y ~ X[-k]. But how to read it? What does it show? Can I expect sth and if it appears/does not ...
0
votes
0answers
10 views

Why does the Breusch Pagan test use unstandardized residuals and predicted values?

If I understand correctly, there are different ways to test for heteroscedasticity. I first learned to do it by looking at a scatterplot of standardized residuals vs. standardized predicted values. I ...
1
vote
0answers
66 views

Are studentized deleted residuals &/or DFfits applicable in logistic regression?

Are studentized deleted residuals and DFfits applicable in logistic regression? In some statistical packages (Stata for example) these statistics are available in linear regression analysis, but not ...