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

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
18 views

Calculate $R^2$, $R^2_{adj}$, and F-statistic from $\text{R}$ model summary

I am given the full model, $M_{\tt f}$, with the regression line $$ {\tt response} = \beta_0 + \beta_1{\tt A} + \beta_2{\tt B} + \beta_2{\tt C} + \beta_4{\tt D} + \beta_5{\tt E} + \beta_6{\tt F} + ...
2
votes
1answer
34 views

Introducing random slopes in nested model improves model fit but residuals variances become unequal

I have measured boldness scores (continuous variable) across time (trials) for individuals (ID) within colonies (colony). The data is coded such that individuals 1-30 belong to one colony, 31-60 to ...
0
votes
0answers
45 views

The feasible generalised least squares residuals

Consider the FGLS estimator. Let $\Psi'\Psi = \Omega^{-1}$ be the weighting matrix using the Cholesky decomposition. Suppose that $\Psi$ is known or already estimated. Consider the transformed ...
1
vote
1answer
48 views

LME residual plot returns a huge linear block of residual points

The publicly available data I used https://content.sph.harvard.edu/fitzmaur/ala2e/cd4.txt I addressed the unbalanced followup visits by transforming the visit time to the nearest multiple of 8 then ...
1
vote
1answer
40 views

Assumptions of linear mixed model not met

I have a repeated measures dataset with which I'm testing if individuals are consistent in their boldness scores (continuous variable) over time (trials). Towards this, I generated linear mixed ...
2
votes
0answers
42 views

How to test Heteroskedasticity for regression model with 5 independent binary variables

I have 5 independent variables at 3 levels : 0, -1, +1 and dependent variable y at Likert scale (1 to 5) The residual vs Fitted value plot doesn't look okay. Please throw some light.
-1
votes
0answers
20 views

How to solve Error in R when plotting residuals: object of type 'closure' is not subsettable [closed]

Help! When I try to plot my residuals I keep getting the same error. I am very new to R and not sure what to do here. Any help is appreciated. Thank You! ...
0
votes
0answers
25 views

why fit `ARMA` model to residuals when doing residual analysis?

I started my Time Series Analysis not long ago and I am currently at the residual analysis. I found, in the course, the tutor was demonstrating residual analysis by fitting an $AR$, then $ARMA(p,0,q)...
0
votes
1answer
21 views

multiple regression - interpreting the plots of the model

I'm doing a multiple regression analysis with up to 9403 observations without any prior hypothesis. The AIC and BIC variable selection both generated the same ideal model. After I ...
4
votes
3answers
356 views

Interpreting autocorrelation in time series residuals

I am trying to fit an ARIMA model to the following data minus the last 12 datapoints: http://users.stat.umn.edu/~kb/classes/5932/data/beer.txt The first thing I did was take the log-difference to get ...
0
votes
1answer
30 views

Information of pearson residual

I have seen Pearson residuals but I would like to know what do I gain from the information of the residuals in the sense of its magnitude? Let's say I have a residual in the size of 0.001 and one of ...
1
vote
1answer
28 views

check the variance

I have a residual plot which is shown below and I am not sure if the variance is constant or not because I can see a funnel shape. Could anyone help me to make a decision about that Could you please ...
0
votes
0answers
12 views

Vector ARIMA residual testing

I wonder how testing the residuals of an ARIMA model works when it comes to vector ARIMA models. Can I simply take the residuals of each univariate estimate and test them seperately for ...
0
votes
0answers
19 views

residual plot for positive variable

I have a linear regression where the output variable is always greater equal zero with a nontrivial weight at exactly zero. The predictions of the model are also always greater than zero. What should ...
0
votes
0answers
22 views

Characterizing estimator, estimate and RV (Regression Question Series - Part 3)

Given a sample set $(X,Y)$, supposing $X$ is fixed and known, Population Regression Function,PRF: Hypothesizing the underlying population, we have, $$\begin{aligned} & E(Y) = \beta_0 + \...
0
votes
0answers
22 views

Is residual in a SRF, an estimate of error in PRF? (Regression Question Series - Part 2)

PRF: Given a sample set $(X,Y)$ we hypothesize underlying population has a regression line as follows. \begin{aligned} & E(Y) = \beta_0 + \beta_1x & \scriptsize \text{(1) PRF} \\ &...
0
votes
0answers
35 views

How do I adress non-normal residuals in gam/gamm

I am trying to fit a GAM where the outcome (y) depends on 2 continuous variables (v1 and v2) and 4 categorical variables (v3-v6). $$M1 <- \mathrm{gam} (y \sim s(v1) + s(v2) + v3 + v4+ v5+ v6)$$ ...
1
vote
0answers
13 views

Checking Residual for Serial Dependence in R

I have residuals that I got from an ARMA-GARCH model via rugarch package: ...
3
votes
1answer
75 views

Errors and residuals in linear regression

I think in common literature about statstics the authors are often very imprecise when it comes to residuals and errors. So far, I could not work that difference out completely and therefore have ...
2
votes
0answers
25 views

Residual-analysis by running KNN or Clustering on incorrect ANN or RF predictions? [on hold]

I've outputs of some neutral net models, which naturally gives some errors in the prediction. What I am interested in is determining whether there are any systemic patterns associated with these ...
0
votes
0answers
23 views

Diagnostic methods for GEE models

Is there a way to assess the "goodness of fit" of a GEE model besides using some numeric criterion (e.g. QIC) ? I was thinking about residuals distribution analysis but I couldnt find any assumption ...
1
vote
0answers
32 views

How valuable is a regression result with serially correlated residuals?

I performed a linear regression with two time series variables. First, I checked stationarity of both time series via ADF/PP/KPSS tests and all three indicated non-stationarity. However the test of ...
0
votes
1answer
23 views

How to calcualte confidence interval for the residual variance in ANCOVA models

As the question states I need to know how to calculate this. Given variable $Y$ and $X$ with $\operatorname{cor}(Y,x)=r$, the residual variance is: $$(1-r^2)\cdot\sigma_Y^2,$$ which represents the ...
2
votes
0answers
21 views

How to manually find ARMA-GARCH residuals in R? [closed]

Let's say the data input is called data, which is in the form of a financial time series that will be fitted into an ARMA-GARCH model. The GARCH(1,1) is used ...
0
votes
0answers
16 views

Trend in residual plot

I have a regression problem: I have to predict for how long (in days) a house will stay in the market before that someone will buy it. To predict how many days the house stays in the market I am ...
10
votes
2answers
390 views

Family of GLM represents the distribution of the response variable or residuals?

I have been discussing with several lab members about this one, and we have gone to several sources but still don't quite have the answer: When we say a GLM has a family of poisson let's say are we ...
0
votes
1answer
20 views

Expectation of residuals in Zero Intercept Model

We know that the summation of residuals in a regression through origin model is not necessarily 0. Does that imply that Expectation of Residuals is not necessarily 0? CLRM still holds, so should that ...
1
vote
1answer
41 views

analyzing residuals vs. fitting a full model

In my field, some scientists look for relationships between a dependent variable, y and a covariate, x1, while controlling for a ...
1
vote
0answers
55 views

Fast way to obtain SSR (Sum of Squares residuals) from QR in least square model?

I am using a linear regression, yet the only output I need is the Sum of Squared Residuals (SSR), I don't care about the coefficients. (Context is a non-linear LS, which is linear given an extra ...
2
votes
1answer
35 views

Expected value of residuals for LASSO model?

For simple OLS models the expected value of the residuals E(ϵ)=0 can be shown to be zero if an intercept is included in the regression equation. I am using a LASSO model and was wondering if the ...
1
vote
2answers
104 views

Orthogonality of residuals in linear regression

In multiple linear regression, I came across the statement that both $e$(residual) and predicted $y$ are projections of actual y and $e$ is orthogonal to predicted $y$. I was trying to visualize the ...
0
votes
0answers
45 views

Partial residual plot for GLMs

I'm trying to understand how exactly partial residual plots are computed for Generalized Linear Models. Lets say you have a response variable $Y$ and three explanatory variables, where a Poisson error ...
0
votes
0answers
31 views

How to deal with autocorrelated residuals from a GARCH model?

I am performing GARCH model on some log returns $r$. If time series of $r$ is autocorrelated, I explicitely model it through a AR model. Then I want to perform the GARCH on the same time series: I ...
0
votes
1answer
35 views

Different length in variable and residuals from the model

After having posted another question on the subject, I'm trying this time on my real data (unfortunately not openly publishable) to find the the best variable transformation that yields linearity in ...
0
votes
0answers
45 views

Diagonal straight lines in residual vs predicted values: can it be fixed with bootstrap resampling?

I am studying a health-related-quality-of life scale and I run a multiple linear model for each of its subscales. For a few of these subscales I came across the pattern of several diagonal straight ...
3
votes
2answers
56 views

How to remove the effect of one variable by using linear model residuals

My data set has species with a number of morphological variables, including body mass: ...
1
vote
0answers
22 views

How to interpret and fix linear pattern in residuals plot

It's my first question, I am not so experienced in stats: feel free to point me to the right direction. I am doing a regression to predict a price. I wanted to check the residuals (the difference ...
1
vote
0answers
24 views

How to calculate residual standard error for a regression model with log link in R

I want to compare residual standard error across a series of different model specifications as one way of assessing model fit. I assumed that calling sigma on a ...
0
votes
0answers
27 views

Interpretation of a residuals vs fitted values plot

My objective is to predict the taxi demand depending on location and time. I transformed the data to be more or less normally distributed and centered & scaled it. Then, I ran a linear regression ...
2
votes
0answers
150 views

How do I compute the residuals from glmnet in r? [closed]

I am working with glmnet and i would like to compute the residuals for the model with lasso penalty. I've simulated data split into training and testing set. My ...
1
vote
0answers
99 views

Expected value of the residuals

How would one prove that the expected value of the residuals from OLS regression is zero? I will make two cases. In the first case I treat $X_i$ as random and in the second case I treat it is non-...
1
vote
0answers
32 views

Prediction of time series with neural network

Suppose I get a forecast, from MLP or LSTM - next 7 time steps into the future. I can assess its quality using mean absolute error using cross validation. However, it is not clear, what I should do ...
0
votes
0answers
4 views

Allowing cluster-level residuals to covary in Proc Glimmix

I am modeling the probability of a child being retained in kindergarten based on individual and school-level factors. The model includes random intercepts and slopes, as follows: ...
0
votes
0answers
8 views

Moving Averages in terms of the Difference Operator?

I am given $$ S_t = \frac{1}{2}(Y_t+Y_{t-1}) $$ $$ S_t' = \frac{1}{3}(Y_{t+1}+Y_t+Y_{t-1}) $$ and I am supposed to express the residual series $Y_t - S_t$ and $Y_t - S_t'$ in terms of the difference ...
8
votes
3answers
149 views

Regressing Logistic Regression Residuals on other Regressors

With OLS regression applied to continuous response, one can build up the multiple regression equation by sequentially running regressions of the residuals on each covariate. My question is, is there a ...
-1
votes
1answer
55 views

Dependent variable - bimodal?

I have a dependent variable, days.to.event, that looks almost bimodal at 0 and 30. I understand that there is no transformation that can normalize this. In fact, when I fit a linear model (lm) with ...
0
votes
1answer
100 views

Mixed models with lmer: Residual diagnostics

I fitted a linear mixed model as follows: fit=lmer(Time.to.obtain.loan ~ borrower.Gender+ borrowing.Amount + (1|borrower.Country) + (1|borrowing.Sector)) The ...
1
vote
0answers
23 views

When fitting an arima model, how do I pick the residuals?

Let's say I have a time series $x_1, ..., x_t$. I fit an AR model and get my estimated parameters. Then I can simulate from this, but in order to do so, I also need some distribution from which I ...
2
votes
0answers
30 views

Relevance of residual normally distributed residuals in nonlinear regression

I have a mathematical equation, based on physics, that requires estimating several parameters via nonlinear regression. I have conducted such nonlinear regression estimation with a dataset of 1100 ...
0
votes
0answers
24 views

Chi^2 Test: Alpha and it's Relation to Sigma

I'm using an Extended Kalman Filter and the $Chi^2$ test to test a part of it's residual during the update. Here I want to determine if the residual lays within 3 Sigma and reject outliers that are ...