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.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

comparing timeseries residuals for different categories

I have a forecast model for epidemiology data (let's say covid cases). I'm trying to compare its performance across different segments e.g. males vs females: whether the model performs (in terms of ...
0
votes
0answers
15 views

Is this Fitted vs Observed diagnostic plot strange?

I am running a linear regression model in R with generalized least squares gls() on my data to fix residuals with unequal variance. I seem to have achieved this; ...
3
votes
1answer
190 views

Simple Regression: how to prove that adding an observation that exactly follows the regression line never decreases the magnitude of the correlation?

Suppose we fit by least square a regression line to $n$ pairs of $(x_i,y_i)$ observations, with $$\hat{y}_i = \hat{\beta}_0 + x_i \hat{\beta}_1$$ Now suppose we add a single observation $(x_{n+1}, y_{...
0
votes
0answers
7 views

Correlation between lagged residuals and regressors in first difference regression

Why would it be the case that the covariance between the lagged residuals and the (or a) regressor in a first difference regression model be non null, i.e. why $cov(U_{it-1},X_{it}) \neq 0$ where $U$ ...
0
votes
0answers
15 views

Fitting a multivariate linear regression with different residual variance for each outcome (using a mixed effects model in R)

In a small simulation, I am fitting a multivariate normal model to predict two outcomes Y1 and Y2, while also modelling the covariance between them. This can be done through a mixed effects model (...
0
votes
0answers
14 views

What does this output tell me about my regression coefficients?

I've run a cross-lagged panel model with two variables in Mplus. I've received the following output and I'm not sure how to interpret the residuals (these are standardised). Are these too high to make ...
0
votes
0answers
22 views

Heteroscedastic errors in logistic GLM - a problem? [duplicate]

I am fitting a logistic GLM (assumed binomial distribution) with a random intercept and slope: DV ~ 1 + IV + (1+IV|subject) The DV is the number of successes of ...
0
votes
0answers
17 views

Difference between Pearson residuals and Deviance [duplicate]

I have a problem complete figuring out the difference between Deviance and Pearson residuals. So what I have intepreted both deviance and Pearson residuals are kind off a distance measurement between ...
0
votes
0answers
21 views

Comparing R^2 and Q^2 residuals

I am calculating the Residuals for a PCA algorithm. When I calculate them though the $Q^2$ residuals sometimes are larger than the $R^2$ residuals. My understanding of the $R^2$ and $Q^2$ relationship ...
0
votes
0answers
9 views

How to interpret decreasing trend in residual vs fitted value plot

Below is my residual vs predicted value graph. It can be seen that it has a decreasing trend. I am using a multi-layer perceptron for regression analysis with 100 hidden layers and 1000 features. How ...
0
votes
0answers
10 views

Standardized to studentized residuals - t distribution

Regarding studentized and standardized residuals. I know that the formula for standardized residual is: However, I don't see why the residuals become t-distributed, when we use the "leave-one-...
0
votes
1answer
25 views

Decomposing a probit/logit regression

In an econometric work, I want to assess the causal effect of n variables on a binary character variable y, while I highly suspect that the relation between one of these regressors, say x (which is ...
0
votes
0answers
18 views

How to normalize predicted values for an outcome event?

I work on predictive models for crime forecasting, meaning I try to model the risk for crimes. In the end of my modeling, I have the following values: number of predicted crimes for each state (...
0
votes
0answers
14 views

On the spatial autocorrelation test on the logistic regression residuals

I'm using logistic regression of presnece-absence model with two features. To test the spatial autocorrelation I used Moran's I test. I performed the test on the residual of the model through : ...
0
votes
0answers
28 views

How to calculate standard deviation of residuals in a Bayesian logistic regression model fit with brms?

I fit a binary logistic regression model with brms as follows: ...
0
votes
0answers
38 views

Different result from shapiro test for seemingly similar residual distributions of gls models

I have a question regarding the distribution of residuals in a gls model. I built a gls model with a numerical dependent variable (Y), a Factor A (categorical, 2 levels) and a Factor B (categorical, 3 ...
0
votes
0answers
33 views

Linear mixed model dependent variable transformation - is this appropriate

I have basically measured a skin conductance over an experiment. Now my dependent variable is the skin conductance at the time of an event. There are several events (scenario) during the experiment. I ...
0
votes
0answers
13 views

Why do the standardized residuals of a general linear mixed model using transformed data show a negative slope? [duplicate]

My data is no. of individuals of a certain age-class in a group, and it is right skewed. When I did a general linear mixed model with the number of individuals in a group as a dependent variable and a ...
0
votes
1answer
17 views

Transformed my model now my residual standard error is too high?

Here's my original Residual vs Fitted plot. The RSE is 4.974 Because it's not linear, I tried transforming it by setting the response to the power of 4. Now my model looks like this. My RSE now is ...
0
votes
0answers
18 views

Do these residuals indicate a nonlinear model?

Do these residuals indicate that the linearity assumption of linear regression is violated. I know that the constant variance assumption is violated, but I am not sure about the linearity assumption. (...
3
votes
0answers
36 views

Dealing with leptokurtosis, should I be worried?

I modeled a mixed model with the lmer library in Rstudio and my residues don't seem normal, with a Shapiro-Wilk test p-value <0.0001 and a QQ-plot that looks heavy tailed. I then plotted the ...
0
votes
1answer
12 views

Time ordering and the `garch` function in `tseries` package in R

I have fitted a garch function using the tseries package in R, and I have observed that the series of residuals produced by the ...
0
votes
0answers
67 views

Analyzing zero-inflated continuous data

I have some trouble with analyzing a dataset with a non-normal distribution. My experiment consist of one continous response variable (ratio data) and two factors; growth conditions and species, with ...
0
votes
0answers
9 views

Residualizing dependent variable when only one group has the predicted value

I have a dataset with two groups. I want to control for a dichotomous variable (i.e. left/right) by residualizing the dependent variable regressing out the effect of the left/right variable. However, ...
1
vote
0answers
36 views

ARIMA(0,0,0) model but residuals not white noise

I have a dataset where I am trying to fit an ARIMA model to a stock return - the data set is stationary. I have used the Auto.Arima function to select appropriate AR and MA terms, and BIC selects ...
0
votes
0answers
7 views

Strange increase in residual variance after adding TVC

I have three growth curves models. Model 1 with just fixed control variables. in a separate model I add a dichotomous, time-varying categorical variable which actually increases the residual variance- ...
1
vote
0answers
24 views

Addressing non-linearity in a fitted vs residuals plot

I am trying to conduct a data analysis project, which involves a multivariable regression model with 13 predictor variables. Before having transformed/ altered the data at all, I fitted a rough model ...
0
votes
0answers
17 views

RSS of ridge regression in terms of OLS estimator

In the work by Hoerl, Arthur E., and Robert W. Kennard , "Ridge regression: Biased estimation for nonorthogonal problems." the following formula (3.1) is presented: $$ RSS=(Y-XB)'(Y-XB)=(Y-X\...
0
votes
1answer
35 views

Does this graph support an assumption of homoscedasticity?

Does this graphics support the assumption of homoscedasticity?
2
votes
1answer
46 views

High-variance residuals in event group in CoxPH

I am using R and coxph() to fit a Cox proportional hazard model. When I plot the deviance residuals using ...
0
votes
0answers
16 views

A big issue for nonnormal distribution of residuals in this case?

I use both histogram and Normal Q-Q plot for the residuals of my regression. I would say that the histogram shows somewhat symmetric and the mean is around 0. On a Q-Q plot, the points seem to fall ...
3
votes
0answers
21 views

Can I conclude heteroskedasticity in this case?

I plot a standardized residuals against the fitted values and it does exhibit a megaphone shape. It looks like there is more variation in the lower level of fitted values. I then conduct a Breusch-...
2
votes
1answer
61 views

Calculating confidence intervals for the variance of the residuals in r

I have three variables: Number of house sales Month (in couples) Region of a city (N-W-E-S) and I want to calculate confidence intervals for the residual of the errors. So, given the data: ...
0
votes
0answers
50 views

Heteroscedasticity: When is it OK?

The point of the last analysis in my paper was to check on the basis of which predictor variables the answers to moral dilemmas can be explained. Predictor variables are continuous: dark personality ...
0
votes
1answer
25 views

Manual calculation of logistic regression residuals

I believe I understand how logistic regression works, and what it approximates. However, I do not understand how residuals of a logistic regression are calculated, especially when there are no ...
0
votes
0answers
31 views

multiple regression model - interpreting graphs for the fit [duplicate]

I have the following r code. I created a multiple linear regression model on a math_and_alcohol dataset. I can see in the summary of the model that the r-squared is .8279 which means the model ...
2
votes
0answers
43 views

Dealing with heavy-tailed residuals and clustered-like relationship

I have two financial time-series (daily log returns) and used the OLS (ordinary least squares) to fit a linear regression model. We can see that the scatterplot of two time-series shows points in a ...
4
votes
1answer
41 views

Confusion on assessing the linearity assumption

This is for assignment. But i am not asking for hold my finger and guide me. Just asking something that is confusing me. I am reading a chapter in which we are using ...
4
votes
1answer
30 views

Does an explicit expression exist for the moments of the residuals in least squares regression?

Consider the linear regression model is $$ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i, $$ where $X$ is a random variable and the error has finite variance $\sigma^2$. When we solve this with least ...
3
votes
1answer
38 views

Non-normal data transformation - what does it imply exactly and what does my results mean?

I am missing some understanding here. I am inspecting the relationship between the heart rate variability (HRV) and errors in the Sustained Attention to Response Task. When I conduct a basic linear ...
0
votes
0answers
27 views

Residual plot transformation question

I need some help figuring out what kind of transformation to do on a residual plot. Essentially, I have to make a residual plot of a player's salary in the NBA compared with their points scored. Here ...
3
votes
1answer
44 views

Interpreting residuals in chi-squared test

Newbie statistician looking for help... I'm trying to determine whether birds in two different area have different diets, based on 8 categories of food items. Running a chi-squared test in R (using <...
0
votes
1answer
50 views

Residual diagnostics in DHARMa for multilevel logistic regression

I'm running a multilevel logistic regression, and have been trying to look at residual diagnostics using the DHARMa package. My data is copy-pastable from here and the following code should run ...
0
votes
1answer
41 views

Correlation of residuals

I have a dataset as follows: ...
3
votes
0answers
34 views

What is the probability distribution and variance of the OLS estimate $s^2$ of the error variance $\sigma^2$ in linear regression?

Consider the standard linear regression model $$ y = X \beta + \varepsilon, $$ where the error $\varepsilon$ has fixed variance $\sigma^2$. We can make an unbiased estimate of the error variance in a ...
0
votes
1answer
35 views

Distribution of prediction error in Cox PH model

For a linear model with error variance $\sigma^2$, suppose the estimator $\hat\beta$ is calculated using training data which used design matrix $X \in \mathbb{R}^{n \times p}$. Suppose we predict a ...
17
votes
4answers
741 views

Why does regularization wreck orthogonality of predictions and residuals in linear regression?

Following up on this question... In ordinary least squares, the predictions and residuals are orthogonal. $$\sum_{i=1}^n\hat{y}_i (y_i - \hat{y}_i) = 0$$ If we estimate the regression coefficients ...
0
votes
0answers
16 views

Interview question: patterns in residuals in “handmade” regression model

I was asked this during an interview, I am not sure my answers make sense. Q: You have got $n$ features $x_1,..,x_n$ for each observation $y$. You build a linear regression model by estimating the ...
1
vote
0answers
16 views

Get Summed Square Errors and Mean Square Errors from mixed models

In R I ran a mixed model using lme(), using anova() I get a Type III ANOVA table, however, in that table, I'm missing the ...
0
votes
0answers
32 views

PRESS from the hat matrix and numerical stability from statsmodels ols.fit()

Leave one out cross validation in the context of ordinary least squares regression can be done via the hat matrix: The "hat" or projection matrix $$ H = X(X^T X)^{-1} X^T $$ many fit ...

1
2 3 4 5
28