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
1
vote
1answer
22 views

Is best model selection by RSS equivalent to best model selection by R2 value?

I am trying to compare models using K-Fold-CV using the regsubsets function in R. By default, it states that the ideal model is determined by the $RSS$. I wished to ...
0
votes
0answers
39 views

How to extract goodness of fit measures, like adjusted/conditional (pseudo) R squared values, from nlme models in R

I normally use r.squaredGLMM() (from MuMIn package) to extract marginal and conditional R-squared (or pseudo-R squared) values ...
0
votes
0answers
17 views

Effect size estimation in mixed model: why is magnitude of fixed effect estimate different to variation explained?

I ran a mixed effects model with a fixed effect, random intercept and random slope. The fixed effect is highly significant but I want to get a feeling for how important/practically relevant or big ...
1
vote
1answer
14 views

Random state value changes the results of rmse and R2

I want to know why everytime I run my algorithm (XGBoost regressor) with a different random state (applied to train/test split part) I get different values for R2 and RMSE. For example : Random state ...
3
votes
1answer
44 views

Interpreting nonlinear regression $R^2$

In ordinary least squares linear regression, $R^2=1-\frac{SSRes}{SSTotal}$ is described as the “proportion of variance explained”. Does this apply to nonlinear regression, too?
1
vote
0answers
23 views

Scikit-learn permutation importance is higher than 1 with R-squared scoring

I'm using Scikit-learn permutation_importance to compute the feature importance for a regression problem according to multiple models. I use $R^2$ as the scoring. ...
0
votes
0answers
16 views

Different results when i define my own score and when using model.score in linear regression (out of sample accuracy)

I am dealing with time feries data. I have a custom function created with sklearn.metrics.make_scorer to compute out-of-sample model accuracy: ...
0
votes
1answer
30 views

Interpreting the total-variance when the model lies over our data

I know that: $Variance_{Total}=Variance_{Explained} + Variance_{Unexplained}$, but I am wondering how the $Variance_{Total}$ relates to the $Variance_{Unexplained}$ and the $Variance_{Explained}$ if ...
1
vote
1answer
20 views

Is the Coefficient of Determination the "explained variance" or the ratio of explained variance to total variance

I have found in multiple texts that the coefficient of determination, or R-squared, is often referred to as the "variance explained". When, to be precise, it seems to be the ratio of the ...
2
votes
1answer
22 views

Accuracy percentage-wise of a regression model [duplicate]

I would like to check in percentage the accuracy of my regression model. I know that normally accuracy is used as a metric for classification. I have evaluated my model based on r-squared and also ...
1
vote
1answer
41 views

Adjusted R2 Validity for Big amounts of observations

I am working with a dataset that has a big amount of observations (2000). The purpose of my work is to find which dependent variables (x1, x2, x3...) are linked to my independent variable (y). I have ...
0
votes
0answers
18 views

Should correlated independant variables be removed to the expense of the adjusted r_squared and rmse?

I have a dataset with a target variable and multiple independent variables. Some independent variables are highly correlated with each other (sometimes r>0.9). First, I thought i'd create a linear ...
1
vote
1answer
50 views

Can $R^2$ be applied to non-linear least square regression? [duplicate]

$R^2$ is usually used as a measure to determine a goodness of a fit. It appears to be used often times for linear least square fits, linear regression. There's another measure which is RSS (residual ...
0
votes
0answers
21 views

R squared for a zero-truncated negative binomial model

Does anyone know how to calculate R squared for a zero-truncated NBM (ZTNB)? I used the methods developed by Nakagawa and Schielzeth 2013 and Nakagawa et al. 2017 to calculate R squared for Poisson ...
1
vote
1answer
28 views

LR test gives contradictory results to R squared

I have a difficult decision here. The R squared suggests that model 1 has a better fit than model 2, but the LR test suggests the model 2 has a better fit. How can I resolve this seemingly ...
0
votes
0answers
16 views

Does it make sense to calculate R2 on splits of test data based on target value percentile?

I have an XGBoost regression model to predict a numeric target y. y is quite right-skewed when I plot histogram. For example, ...
1
vote
2answers
68 views

Why are my elastic net and lasso r-squared measures negative?

I'm using sklearn.linear_model.Lasso and sklearn.linear_model.ElasticNet on a model that includes a constant. I don't expect a model with a constant to perform worse than the average of the data, ie ...
0
votes
1answer
28 views

ANOVA vs R-Squared (Explained Variance)

My goal is to determine whether for linear regression some predictors uniquely improve the fit beyond that which is already available via all other predictors combined. I have originally tried multi-...
3
votes
1answer
50 views

Designing an experiment with linear regression analysis: more categories or more observations per category?

During the design of my experiments I encountered the following question: When doing a linear fit (least squares), does it make more sense to have more categories or more observations per category. In ...
1
vote
0answers
38 views

How to interpret increase to AIC and adjusted r-squared?

I understand adjusted r-squared and AIC can be used to select an ideal model from a group. Higher AIC is worse but higher ar2 is better. After adding a categorical variable to an OLS model, my ...
0
votes
0answers
21 views

What does it mean when SSR>SST?

Following is an example of the observed and predicted values for my variable y (in R). ...
0
votes
0answers
26 views

Confidence interval of mean of sample R-squared values

I have read some posts about how to calculate the confidence interval for a single R-squared value from linear regression. But now I am asking that what if I have a sample of $R^2$ and I want to ...
1
vote
1answer
32 views

Find r-squared of points around an x=y line (R)

I have some data I obtained from a lab experiment that shows the theoretical value of variable A, against its actual, experimentally derived value, for a range of variable A. I've plotted the data as ...
3
votes
1answer
120 views

Here's why you can (hopefully) use $R^2$ for non-linear models. Why not?

We calculate $R^2$ as follows: $R^2 = 1 - \frac{\|y - \hat y\|^2}{\|y - \bar y\|^2}$ $y$ is a vector of true answers; $\bar y$ is a vector whose elements are mean of $y$; $\hat y$ is a a vector with ...
1
vote
1answer
49 views

conflicting values for RMSE and R-square

I am doing linear regression on a dataset. I divided the data into training (70%) and testing(30%). Here are the metrics for training and testing data: Training data: R2 is 0.85 and RMSE is 2339 ...
0
votes
0answers
16 views

Interaction term as a Covariate

Can I use an Interaction Term as a covariate, without any interaction with my primary variable of interest? $Y = a + bX_1 + cX_2 + dX_3 + eX_2*X_3 + error$ where a is the intercept, and b, c, d, e are ...
0
votes
0answers
16 views

Interpreting R2 Over Cross-Validated Folds

I am running a supervised regression with cross validation, and wish to use $R^2$ as my performance metric. I am using Leave-P-Out cross validation, with P=2, which gives me approximately 4500 folds, ...
3
votes
2answers
107 views

How is the relationship between two variables $X$ and $Y$ supposed to "explain" $R^2\text%$ of the variation of the data?

Suppose we have a linear regression and we calculate $R^2 = 0.81$. What do we mean when we say "the relationship between two variables $X$ and $Y$ explains $81\text%$ of the variation of the data&...
0
votes
1answer
29 views

Positive train score and negative test score in sklearn [duplicate]

I am doing a regression model using kfold cross validation using a dataset with ~200 data and noticed my r2 score on train data is positive(average 0.7) and my r2 test score is negative. What does it ...
1
vote
1answer
31 views

Why to put variance around the mean line to the definition of $R^2$? By what is this particular choice dictated?

Suppose we have a linear regression and we calculate $R^2 = 0.81$. That means $81\text %$ less variance around the regression line than mean line, since $R^2 = \frac{\mathrm{Var\ (mean\ line) - Var\ (...
4
votes
2answers
516 views

Why getting very high values for MSE/MAE/MAPE when R2 score is very good

I am applying different regression models (RF, Knn, etc) on some well-known datasets (bike sharing, diabetics, etc). The value of R2 is very good. From the R2 score,...
1
vote
1answer
37 views

How can I calculate the R-squared of a simple linear regression only with sample size, the coefficients and its standards deviations?

I have the following estimated simple linear regression, which was estimated from a sample of 1217 individuals: $\hat{y}=1.77663 + 0.0910103x$ where $\hat{\beta_0} = 1.77663$ and standard deviation of ...
0
votes
0answers
30 views

R2 for mixed-effects Conway-Maxwell Poisson using package glmmTMB

After running a mixed-effects Conway-Maxwell Poisson model using glmmTMB, I've printed the results using sjPlot's tab_model() but I don't know what R2 calculation is being used. Is it Nakagawa's R2 ...
2
votes
1answer
51 views

How to show VIF

The variance of the $j$th element of the OLS estimator is given by $$\operatorname{Var}\left(\hat{\beta}_{j}\right)=\sigma^{2}\left(X_{j}^{T} M_{-j} X_{j}\right)^{-1}$$ where $X_j$ is the column of ...
1
vote
1answer
72 views

$R^2$ explanation to commercial people

We have a representative digital panel that measures digital media consumption of panelist and then project it for the total population via weighting. Recently I ran a multiple regression on panel ...
12
votes
3answers
1k views

Is it correct to say one 'estimates' or 'measures' r-squared?

I am writing a report and am unsure about whether is correct to say one 'measures' r-squared or whether one 'estimates' it. I know the two words have two different semantic meanings, probably related ...
0
votes
0answers
38 views

$p$-value and $R^2$ of a Power Regression Model

I'm trying to perform a power regression model to fit my data. I used this script to find the angular coefficient and exponent of my power regression. ...
0
votes
1answer
45 views

R-squared as sample size increases

How do I prove that $R^2=1-\frac{SSR/n}{SST/n}$ converges towards $\rho^2=1-\frac{\sigma^2_u}{\sigma^2_y}$ as $n \rightarrow\infty$, where $\sigma^2_u=\operatorname{Var}(u)$ and $\sigma^2_y=\...
0
votes
0answers
25 views

How does the meaning of R^2 come from squaring R?

I think more or less I understand what R and R^2 are, but I do not understand how R^2 comes from R. In a video I saw this explanation for R^2 : (VAR[mean] - VAR[line]) / VAR[mean]. From this formula I ...
0
votes
0answers
11 views

Total inconsistence between Pearson correlation in a correlation matrix vs Pearson test AND Rsquare smaller than Pearson [duplicate]

I have a very urgent issue that I need to solve this weekend. If I create a linear model between 2 variables and look for the R square with this code: ...
1
vote
0answers
42 views

Why can't we use sum of absolute residuals instead of R squared method in Linear regression [closed]

I am fairly new to statistics, so can somebody explain to me the given question in simple terminology. I read almost all answers on stack exchange but all I can say is they are too technical for me. A ...
4
votes
1answer
118 views

Conceptual/Math/brainteaser Question: Multiple Linear Regression

This is kind of a brainteaser and I'm struggling to solve it, any ideas on approaching this would be valued: I thought about using substitution of the different x and z into the third regression ...
0
votes
0answers
7 views

standard deviation of the model R2 in LOOCV in caret

I am performing a LOOCV linear model and I got the parameters R2 and RMSE, but I was wondering if there is a way to calculate the standard deviation of the model R2. I tried to do it in the same way I ...
0
votes
0answers
19 views

What is the relationship between a simple regression's $F$ value for $R^{2}$ and $t$ value for a slope?

I have a question that states: In a simple regression, if the $F$ value for $R^{2}$ is 4, then the $t$ value for the slope $b$ must be...? I'm having trouble understanding how to figure out the ...
0
votes
0answers
19 views

understanding R2 in probit

I try to create a model to predict football (socker) results with a performance variable. It doesn't really matter how this performance is calculated since any performance variable is an adequote ...
1
vote
2answers
80 views

Removing variables from a linear regression improves $R^2_{adj.}$

I am working on a linear regression model. The complete model with 11 variables in total has a quite low adjusted R-squared ($R^2_{adj.}$) of 0.11. 4 variables have a significant influence on the DV....
2
votes
1answer
42 views

How to adjust the standard error for a standardized beta after squaring the beta

I have a standardized beta from a regression, which is equivalent to a correlation. I also have it's standard error (SE). I want to plot the R2 (explained variance) with an error bar, and to get the ...
0
votes
0answers
39 views

Explained variance score vs $R^2$ score

I came across explained variance score and $R^2$ score in scikit learn docs. Docs defines exaplained variance score as: $\text{explained variance} (y,\hat{y})=1-\frac{Var\{y-\bar{y}\}}{Var\{y\}}$ ...
0
votes
1answer
38 views

Understanding regression model with and without intercepts

I was going through this answer which gives total sum of squares as $TSS=\sum_i(Y_i-\hat{Y}_i)^2+\sum_i(\hat{Y}_i-\bar{Y})^2+2\sum_i(Y_i-\hat{Y}_i)(\hat{Y}_i-\bar{Y})$ It then says: In a model with ...
0
votes
0answers
12 views

Can it be shown analytically that the sum of squared semipartial correlations is bounded by r-squared?

Two related questions: I have read in different texts that the sum of squared semipartial correlations is "typically" less than $R^2$, except when supressor variables, or rather a supression ...

1
2 3 4 5
19