Questions tagged [r-squared]

The coefficient of determination, usually symbolized by $R^2$, is the proportion of the total response variance explained by a regression model. Can also be used for various pseudo R-squared proposed, for instance for logistic regression (and other models.)

Filter by
Sorted by
Tagged with
2 votes
0 answers
75 views

How can we justfify the assumption of equal scale/variance in the definition of R-squared from Deviances in GLMs?

If we take the R-squared to be the comparison of Deviances between models (the model of interest, the saturated model, and the constant model), we can write it as (see this answer CC BY-SA 4.0): $$R_{...
Firebug's user avatar
  • 18.3k
4 votes
1 answer
60 views

When does adding a new predictor not increase $R^2$ in OLS?

So I know that if the new predictor lies in the subspace spanned by the existing predictors, then $R^2$ will not increase. However, I recall reading that this is a sufficient condition, but not a ...
24n8's user avatar
  • 1,127
0 votes
0 answers
46 views

metafor|When fitting a mixed-effects regression model using the rma function, the tau^2=0 and R-squared value is 1 [closed]

I'm conducting a meta-analysis using the metafor package in R. While performing mixed-effects meta-regression with the following code: ...
Chuanxu Fang's user avatar
1 vote
0 answers
38 views

Sample size and power calculations for multiple linear regression looking for an r squared increase [duplicate]

I want to perform a multiple regression, comparing a model with "traditional" risk factors, with a model that has two tested "novel" risk factors. I'm want to make sure that the ...
Mark Davies's user avatar
3 votes
2 answers
68 views

Is there an intuitive explanation for why $R^2 = \hat{\beta_1} * \hat{\alpha_1}$

In simple linear regression with one regressor, if you regress $y$ on $x$, i.e., $\hat{y} = \hat{\beta}_1 x + \hat{\beta}_0$ and $x$ on $y$, i.e., $\hat{x} = \hat{\alpha_1} y + \hat{\alpha_0}$, you ...
user5965026's user avatar
0 votes
0 answers
18 views

pls with constant variable

I am using Partial Least Squares (PLS) to predict the outcome variable Y. Prior to running the PLS, I included a column of 1 in the independent variable dataset X as a constant variable. However, I ...
Cristoph Magoosh's user avatar
6 votes
2 answers
277 views

Are these two definitions of the coefficient of determination $R^2$ equal?

I want to do multiple linear regression as explained on this Wikipedia site: I am given the following data: $$ yx=(~(y_1,x_{11},\ldots,x_{1p}),\ldots, (y_n,x_{n1},\ldots,x_{np})~) $$ of $n$-many ...
mrpotato's user avatar
8 votes
1 answer
333 views

Histograms and R squared correlation

I have two sets of predictions. One prediction has an R2 = 0.57, the other R2 = 0.51 . Plotting histograms of the predictions shows that the set with R2 = 0.51 looks more accurate as compared to the ...
ggoogle userr's user avatar
0 votes
0 answers
31 views

Is it possibile to reverse engineer a partial R2 squared from a multivariate regression table?

I don't have any data, so I'm trying to extract a partial R-squared for one of the predictors from a linear multiple regression, in order to calculate the sample size for a regression study I would ...
GT87's user avatar
  • 1
4 votes
1 answer
127 views

Is $\sum_i(\hat{y_i} - \bar{y})^2$ really the explained sum of squares in regression in general (not just OLS)? What is its interpretation on its own?

It is common to break down the total sum of squares (related to the total variance in $y$) in a regression problem, into components. $$ y_i-\bar{y} = (y_i - \hat{y_i} + \hat{y_i} - \bar{y}) = (y_i - \...
Dave's user avatar
  • 58k
2 votes
1 answer
44 views

Test or training data? R², predicted R² and adjusted R²

I would like to understand the difference between simple R², predicted R², and adjusted R². I have done several research and readings, but the difference is still not clear to me. I have even reached ...
guest's user avatar
  • 21
5 votes
1 answer
175 views

What sense does adjusted $R^2$ and deviance explained mean for quantile generalized additive models (QGAMs)?

I've done some reading here in the past, and my basic assumption is that for a generalized additive model (GAM) or a quantile regression (QR), the following is generally true: For a Gaussian ...
Shawn Hemelstrand's user avatar
2 votes
1 answer
51 views

What's the difference between "standard error of estimate" versus the "variance of residuals"

For OLS linear regression, Hayes (2022, p. 56) provides a definition of "mean squared residual" and one for "standard error of estimate", for a model with $k$ predictor variables: $...
moses.rivera100's user avatar
2 votes
1 answer
45 views

R-squared vs adjusted R-squared in Hierarchical multiple regression

In hierarchical multiple regression (not to be confused with hierarchical linear models that account for variance components), you add model terms by block. The fit of the new model is measured by the ...
Migs F's user avatar
  • 21
3 votes
1 answer
58 views

Should Kullback-Leibler as an R2 value be large or small for better goodness-of-fit

I am trying to use the Kullback-Leibler as an R2 value for goodnes-of-fit for GLM models. The R package performance defines their function as: ...
simpson's user avatar
  • 133
0 votes
1 answer
60 views

Misleading $R^2$ values due to clusters on the opposite side of the regression model [closed]

I have a regression model for density predictions and I eventually did a model that I do not trust. It gives me an $R^2$ of 0.93 I am not sure what to call this phenomenon: is this heteroscedasticity?...
Tino D's user avatar
  • 13
2 votes
1 answer
30 views

Is R-squared valid for regularized linear models?

I found that there has been extensive discussion on the invalidity of R-squared for nonlinear models according to its original definition based on the following mathematical analysis,. The variance in ...
Alex's user avatar
  • 83
2 votes
1 answer
61 views

Definition of $\text{“}R^2\text{”}$

I have always taken $\text{“}R^2\text{”}$ to mean the proportion of a sum of squares explained by a model. The context in which this idea is first encountered is when one explains part of the total ...
Michael Hardy's user avatar
0 votes
0 answers
11 views

How to calculate R-squared for the unequal number of LST and CO samples?

I want to calculate R-squared from LST and CO data in GEE. However, after considering the revisit time and cloud masking, I get very few data for Landsat-8 with respect to CO data. For example I have ...
usergeo's user avatar
2 votes
3 answers
185 views

Why does heteroskedasticity not affect $R^2$ and why does it make estimated regression more statistically significant?

I am studying what the consequences of heteroskedasticity are. And i found that assuming that the model is linear in the parameters (i.e $Y=X\beta+\epsilon$), is identifiable, has no perfect ...
abhishek's user avatar
  • 236
0 votes
0 answers
65 views

negative $R^2$ but positive correlation [duplicate]

I have a predictor $\hat{y}$. I have noticed that the correlation between $\hat{y}$ and $y$ are quite positive, above 50% even, while the $R^2$ is negative. Note that this is an out-of-sample $R^2$ ...
Matt Frank's user avatar
4 votes
2 answers
1k views

Can someone help me understand why the MAE, MSE and RMSE scores for my regression model are very low but the R2 is negative?

I am using a random forest regression model to make predictions and leave one out cross validation for my prediction task. I am having a difficult time understanding why my R2 score is negative when ...
Rai's user avatar
  • 43
2 votes
3 answers
207 views

Computing the variance explained by a predictor variable in logistic regression

I'm keen to know how to compute the variance explained by a particular predictor variable in the model (say component specific R squared). I went through Calculate variance explained by each predictor ...
Dovini Jayasinghe's user avatar
0 votes
1 answer
18 views

Is the R2 statistic affected by normalizing your timeseries?

I have been trying on comparing to time series, one predicted and one measured. One of the first and most simplistic statistics that can help is R2. I have no issues calculating R2 but my supervisor ...
TryingCode's user avatar
1 vote
1 answer
57 views

Relative importance in hurdle model: which metric to use?

I want to calculate the relative importance of predictors of a hurdle model, my first choice is dominance analysis. For that I would need a suitable metric of model quality. My first thought is to use ...
M. Riera's user avatar
0 votes
0 answers
49 views

R squared after including fixed effects

I have a regression model where the dependent variable is the difference in income between adjacent towns i and j. The independent variables are also differences in other parameters between these two ...
user584534's user avatar
0 votes
0 answers
28 views

Coefficient of determination (R^2) [duplicate]

What do we mean when we say that R^2 is he proportion of variability in Y explained by X, Since R^2 = (TSS-RSS)/RSS, So o what basis do we consider TSS as total variability and RSS as Unexplained ...
Satvik Jain's user avatar
0 votes
0 answers
35 views

Low CV-RMSE and negative $R^2$ (comparative)

I am trying to predict a numeric variable using XGBoost with optuna for hyperparameter optimization. I defined two objective functions for optuna, one optimized for very small datasets (5 to 17 ...
RaduIoan's user avatar
1 vote
2 answers
33 views

How can I accumulate R-squared over time intervals with a model that makes predictions for a single interval?

I have a model that makes a prediction of the change in a number during a time interval. The model depends on covariates that happen during the interval of prediction, as well as a weighted average of ...
Chechy Levas's user avatar
  • 1,193
0 votes
0 answers
84 views

Training on the full dataset after cross-validation, proof, part 2

I was reading the question Training on the full dataset after cross-validation? and found a corresponding literature reference Moiser 1951, https://doi.org/10.1177/001316445101100101 who claims good ...
Ggjj11's user avatar
  • 822
1 vote
1 answer
101 views

Multivariable regression with binomial covariates and interaction terms. Why is the predictive power of linear regression w/o interactions so high?

TL;DR: How could the $R^2$ of a linear model approach 1 when the outcome is solely determined by interaction terms (i.e., there's no underlying "main effect")? It doesn't seem to happen when ...
Jordan Taylor's user avatar
1 vote
2 answers
42 views

How can you convert sum of squares deviation to an r-squared value?

I would like to calculate the r-squared value for some regressions. The model (its in a GUI) I am using gives me "goodness of fit" in terms of the sum of squares deviation. I am using ...
vermicellion's user avatar
1 vote
0 answers
55 views

Understanding ICC and R2 in a MLM

I have a simple repeated measures mixed-level model with random intercept by participant. I am trying to understand the resulting R2 and ICC values. I have read numerous discussions on here, but none ...
Trypanosoma's user avatar
0 votes
0 answers
40 views

Way to quantitatively show which model fits better?

I have some experimental ice polarization data, and simulated the polarizations of possible size/shape particles that could be present in the system. I want to use my polarization data to ...
Claudia's user avatar
3 votes
1 answer
239 views

Does it make sense to interpret OR when the McFadden pseudo R-squared is 0.15?

I have fitted a logistic regression model (with 6 variables) and obtained a McFadden pseudo R-squared of 0.15. I am now seeking guidance on interpreting odds ratios in light of this value. My ...
LeterPeko's user avatar
1 vote
0 answers
54 views

Calculating R-squared (coefficient of determination) from WLS linear regression with zero intercept

I need to calculate the R^2 for a weighted least squares (WLS) regression model which is also a regression through the origin (RTO). I'd like to use it for comparing the quality of the fits for the ...
Virag's user avatar
  • 11
0 votes
0 answers
13 views

Nakagawa's R2 for a two-level model with two weight variables

I am trying to get Nakagawa's conditional R2 in R, for a two level model with two weight variables. The problem I am facing is however that only a limited amount of packages allows to estimate ...
emilie franck's user avatar
1 vote
1 answer
21 views

Regression Simulation with random variable - Getting pvalue

i have the following problem: I have a sample of individuals who have opinions on certain subjects. I have to group these individuals randomly in groups the same size for every subject and take the ...
Bestimas's user avatar
10 votes
2 answers
530 views

Negative R2 on Simple Linear Regression (with intercept)

I am doing a simple Linear Regression (with intercept) which ends up presenting a negative R2, this should not be possible (cf comment 2 at the end) Reproducible examples of the issue: Minimal ...
Jean Lescut's user avatar
3 votes
2 answers
226 views

Visualizing Multicollinearity: How does overlapping region of IVs contribute to R²?

I have trouble understanding how R² in a regression analysis makes sense visually in Ballantine diagrams. For instance: Obviously the red region is ignored when estimating the coefficients for x on y ...
Johannes Titz's user avatar
0 votes
2 answers
237 views

when reporting odds ratios should you include R-squared values?

I'm reporting odds ratios for a logistic regression. I'm including p-values but it doesn't include R-squared as elsewhere, it says that "Odds Ratios and Log(Odds Ratios) are like R-Squared". ...
pluke's user avatar
  • 149
0 votes
0 answers
42 views

dev.ratio in glmnet

After running glmnet I can get a pseudo R-squared with glmnet.fit$dev.ratio. Does this take into account the complexity of the ...
locus's user avatar
  • 1,295
0 votes
0 answers
33 views

Goodness of fit for in-sample predictions

This is probably a stupid question that I'm overthinking, and apologies if it's super obvious, but - Say you have some regression model y ~ f(x1, x2...) that you ...
TY Lim's user avatar
  • 161
1 vote
0 answers
20 views

How is R-squared calculated in the "Blavaan" R package and is it appropriate to use/report in bayesian analysis?

I am using the Blavaan R package to fit bayesian path analysis models. The output includes an R-squared value. It has come to my attention that there are problems with using R-squared for bayesian ...
Collin's user avatar
  • 11
1 vote
1 answer
35 views

Best model in-sample is the worst out-of-sample

I have three times series (X, Y and Z) with a length of 2000 observations. I am fitting three different models: $Y_t = \beta_0 + \beta_1 Y_{t-1} + \epsilon_t$; $Y_t = \beta_0 + \beta_1 Y_{t-1} + \...
Residual Claimant 's user avatar
1 vote
0 answers
49 views

Presenting separate linear regression models in one regression table? [closed]

I've created this regression table, but I'm unsure if this is the correct way to present my results. The dependent variable is the proportion of each frame, and the independent variable is time (from ...
stats1588's user avatar
0 votes
0 answers
19 views

Negative RSquare Value but Good View on Chart for RNN Time Series

I'm fairly new on univariate time series forecasting and deep learning. My task is to forecast energy consumption values. May data looks like: I'm usin simple RNN, because I have tested with linear ...
Beyza's user avatar
  • 1
5 votes
2 answers
153 views

Is there sense to be made for two-tailed T-test and OLS of two variables?

Let's say we start off by generating 2 random uniform variables between 1 and 100 ...
Dean MacGregor's user avatar
0 votes
0 answers
33 views

Calculate $R^2$ longitudinal multilevel analysis

How can I calculate $R^2$ for multilevel longitudinal analysis without Level-1 variance in R? One predictor is a factor (Treatment: A, B, C).
Stefanie's user avatar
2 votes
1 answer
94 views

relation between R-squared and sample size

Here is the question: Suppose $X, Y$ are independent $N(0,1)$ random variables. And take the regression of $Y$ against $X.$ What is the relationship between $R^2$ and sample size approximately? ...
user6703592's user avatar
  • 1,245

1
2 3 4 5
22