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
0 votes
1 answer
13 views

Change in R squared

I am running a regression to test how different attributes affect house prices. These attributes have been separated into three categories that are: structural factors (number of room, size, square ...
user avatar
0 votes
0 answers
16 views

R squared of subgroups

I am trying to predict a value using a linear regression, and I get an R squared of 0.63. My data is composed of 5 different groups (each with different ...
user avatar
  • 101
0 votes
0 answers
7 views

Variance explained at each level of a categorical variable

I have a deep learning regression that predicts the value of a continuous variable Y. There is a categorical variable Z that has ...
user avatar
  • 4,562
0 votes
0 answers
16 views

Adjusted $R^2$ (R-squared) for multivariate regression

For univariate or single independent variable regressions, this formula can be used (details here): $$R^2_{adjusted} = 1- \dfrac{SSRes}{SSTotal}\dfrac{n-1}{n-p}$$ However, I cannot find a similar ...
user avatar
1 vote
0 answers
17 views

Meta-analysis of "adjusted r-squared" from multiple prediction models

Using data from multiple cohorts, I am trying to check the performance of a prediction model I developed. The plan is to get the Adjusted r-squared from 2 models, one model has the score and the other ...
user avatar
0 votes
0 answers
6 views

Multilevel models significance

For example, in the OLS regression (not multilevel), we have R^2 and p-value for F test. This p value indicates whether R^2 is significance or not. In multilevel models, we have R^2 as well (marginal/...
user avatar
  • 109
3 votes
1 answer
30 views

Extreme Heteroskedasticity - Multiplicative Model - Strange residuals

I absolutely need your help with my research. When I checked for heteroskedasticity I obtained a weird result from the white test (p value = 0). When I plot the residuals, these are the results: ...
user avatar
  • 31
0 votes
0 answers
31 views

Does $R^2$ measure goodness of fit or not? [duplicate]

I have been warned against $R^2$ as goodness of fit before, but am unsure why. What is wrong with using it to characterize how well a line fits data points? I have looked at a few sources to try and ...
user avatar
  • 13
0 votes
0 answers
20 views

mgcv GAM models in R package caret - how to interpret output

I am attempting to evaluate two GAM models I developed in mgcv via leave-one-out cross validation in the caret package. I am a newbie to both GAMs and cross-validation. For the purposes of this ...
user avatar
  • 11
1 vote
1 answer
46 views

Why OLS perform better than LASSO?

I am comparing OLS and LASSO regression for survey data. I have n>p, but I think my data is high-dimensional data as the p is 3000 and n is 48000. I am using k cross-validation. The results are ...
user avatar
  • 11
2 votes
1 answer
32 views

Adj. $R^2$ with tree ensembles

Consider tree ensemble methods such as XGBoost, Lightgbm and/or Catboost. Is the adj. $R^2$ a valid metric for tree ensembles? I'm curious because these methods handle factor variables differently. E....
user avatar
  • 218
0 votes
0 answers
13 views

Can introducing time fixed effects variable into a PanelOLS decrease overall and between R^2?

I am trying to find if there is a relationship between the number of people employed by the tech industry within a city and wages in that city. I ran two Linear Regressions on my data. The first one ...
user avatar
0 votes
0 answers
18 views

Measure of goodness-of-fit in errors-in-variable regression

I have two observed time series $x_i$ and $y_i$ and I want to test if $x_i$ is a good predictor of of $y_i$. So I would usually run a simple linear regression Y ~ X and use $R^2$ as a measure of ...
user avatar
  • 1
0 votes
0 answers
19 views

Weighting the R-squared as a measure of goodness-of-fit in Linear Regression [duplicate]

I have two observed time series $x_i$ and $y_i$ and I want to test if $x_i$ is a good predictor of of $y_i$. So I run a simple linear regression Y ~ X and use $R^2$ as a measure of goodness of fit. ...
user avatar
  • 1
1 vote
1 answer
28 views

Using R-squared to assess the performance of prediction models

Say I have some true values of some variable of interest $y_i^t$ for a population of individuals indexed by $i$. Now say I have some model-based predictions of those true values, which I'll denote by $...
user avatar
0 votes
0 answers
15 views

F-test value in significance test for Linear Regression; what is the value when R^2 is equals 1?

What is F-test value in significance test for Linear Regression when $R^2$ is equals 1?
user avatar
0 votes
1 answer
42 views

Why normalize the vectors to calculate the Pearson correlation coefficient?

I learned from this answer that the correlation $R$ is $\cos(\theta)$ and $\theta$ is the angle between a dependent vector $Y$ and an independent vector $X$, but I learned from this article that the ...
user avatar
  • 5,151
1 vote
0 answers
25 views

Why we do not use r squared for logistic regression? [duplicate]

Why we do not use R squared for logistic regression? What is the logic behind it?
user avatar
  • 11
0 votes
0 answers
15 views

Why is R-squared Not Valid for Nonlinear Regression? [duplicate]

Why is R-squared Not Valid for Nonlinear Regression? Why we generally do not use it in nonlinear regression?
user avatar
  • 11
0 votes
0 answers
13 views

Significance test if R-squared ($R^2$) is significantly different from 1 (or some number very close to 1)

I am trying to find a way to test if a R-squared value that is high (>90%, on a small sample of c30 observations) is not significantly different from 1 (or at least from a number very close to 1, 0....
user avatar
0 votes
0 answers
7 views

Different tests for model fit

I saw that in linear regression models one often uses a hypothesis z- or t-test for $R^2$ or for effect sizes. A z-Test is only useful if the standardized $R^2$-values are standard normally ...
user avatar
1 vote
0 answers
33 views

How to distinguish two versions of R-squared calculated on test set?

I've come across two ways that people calculate R-squared on a test set: Calculate the square of the correlation between predictions and actual values (in practice, I've seen people do this in R by ...
user avatar
  • 3,768
1 vote
0 answers
33 views

Reference for calculating $R^2$ on a subset of the samples

I've been looking for a method to calculate $R^2$ on a subset of the samples (a subset of the instances, not a subset of features), and found this answer from Dave. It suggests using the mean of the ...
user avatar
  • 476
1 vote
1 answer
31 views

correlation range between y and two variables x1 and x2

What is the correlation coefficient (or range) $corr(y,\hat{y})$ for the regression $\hat{y}=ax_1+bx_2+c$ given that the correlation between $x_1$ and $y$ is 0.5 and the correlation between $x_2$ and $...
user avatar
  • 11
0 votes
0 answers
29 views

What could cause the F-statistic to increase but adjusted $R^2$ to decrease?

I have created two multiple linear models of the same data. The two models vary only in the dropping of a few variables. Model_A includes all X independent vars (A,B,C,D): Model_B includes only A,B ...
user avatar
2 votes
2 answers
73 views

MSE is 'scale dependent'. R-squared seems a better measure of fit for regressions. Are there others?

Mean-Squared Error is scale dependent. For example if I have an MSE of 0.1 and multiply all of X and Y by 100, redo my regression and calculate MSE, I get an MSE of 1000.0. ((y_true-y_regr)^2 ---> ...
user avatar
  • 21
0 votes
0 answers
8 views

Mean of Relative Error Vs. Coefficient of Determination

Consider we have a method that estimates a specific parameter. We want to find the accuracy of this method and we have 10 samples (these samples include the true values of the parameters and their ...
user avatar
  • 151
2 votes
1 answer
111 views

How do you write the AIC and BIC of a regression model in terms of the coefficient-of-determination?

This question is to give a general exposition of the relationship between goodness-of-fit statistics in regression analysis, to answer questions like this one. Consider a nonlinear Gaussian regression ...
user avatar
  • 94.6k
2 votes
1 answer
107 views

Linear regression gives a good $R^2$ but also a high BIC

I tried a linear model with interactions on my data ($n=95,840$ rows) : ...
user avatar
  • 131
1 vote
0 answers
18 views

Generating random samples that satisfies specific r-squared of MAPE

I would like to generate some samples that satisfies a specific r-squared or MAPE(Mean Absolute Percentage Error) with a given vector. For example, a vector a_i is given and I want to generate some ...
user avatar
2 votes
1 answer
58 views

Adjusted $R^2$ as an Alternative to a Test Set?

I am trying to understand the following statement from Max Kuhn and Julia Silge about the use of adjusted $R^2$ when fitting a regression model. Is it correct that the adjusted $R^2$ does not need to ...
user avatar
0 votes
0 answers
70 views

Is Stata xtreg "within" r-squared incorrect when using i.time fixed effect dummies?

In Stata xtreg y x1 x2 i.year, fe will give the within R-squared, but is it calculating it using the projected model (taking out fixed effects) yet mistakenly (my ...
user avatar
  • 91
0 votes
0 answers
20 views

R packages for psuedo R squared disagreements

I'd like to report a psuedo-R^2_glmm for some glmms I've made. Oddly, I've found each R package I've tried gives a different result, while I thought these all are doing the same thing in principle. At ...
user avatar
  • 1
1 vote
2 answers
97 views

is it okay if r-square and RMSE for the lasso be worse than normal linear regression?

I am comparing three regression models, simple linear regression, Lasso and Bayesian Lasso then the R-Square and RSME for them are ...
user avatar
  • 123
0 votes
0 answers
10 views

How to estimate standard errors and R2 from variance-covarariance matrix? [duplicate]

This is what says "the following table shows the variances and convariances of the logarithms of the importations, PIB and IPC in USA between 1975 and 2005. Here is the table with variances/...
user avatar
2 votes
1 answer
51 views

Comparison of predictor performances in different models

My intention is to test the power of a single predictor x in predicting different responses: y1 that is presence/absence and <...
user avatar
0 votes
0 answers
14 views

Proper metric to compare continuous to discrete data? [duplicate]

I have two measurements of the same thing. The first is a subjective rating score, the second is a quantitative metric. The rating score is discrete (0-10), while the quantitative metric is any value ...
user avatar
0 votes
0 answers
15 views

How meaningful is the outcome of a mixed effect model with small R²marginal combined with a medium R²conditional?

I have a mixed effect model with two independent categorical variables x1 (two levels) and x2 (4 levels), a nested design where <...
user avatar
0 votes
1 answer
27 views

Removing variables and getting a worst model

I checked several questions, but I think that my question is very simple comparing with others. I do understand that it is very naive question. I created model 1, after that I eliminated the non-...
user avatar
  • 3
2 votes
1 answer
212 views

How to interpret a significant F-statistic but low R-squared?

I have never seen it, but using a dataset of 10k observations, a simple linear regression resulted in a significant F-statistic (over all variables), but a low R-squared. I interpret it as that the ...
user avatar
  • 1,095
0 votes
1 answer
46 views

$R^2$ vs. significance of the other variables

I am currently working with panel data to see if there is correlation between sustainability and performance in the energy and materials sector of the S&P500. I ran the regression twice, one with ...
user avatar
2 votes
2 answers
41 views

Is it possible to get an overall measure of variance explained by different levels of a categorical predictor, without using a reference level?

Let's take a model like this: mod <- lm(Petal.Width ~ Species, data = iris) Is there any way to know how much variance is explained by each level of Species ...
user avatar
  • 1,641
0 votes
1 answer
219 views

Best way to perform a key drivers analysis

I am trying to perform a key driver analysis. I have performed a simple OLS regression on my dataset using the statsmodels api on python. It gives me the desired results, but I am not sure if ...
user avatar
0 votes
1 answer
41 views

I have a VAR model, can I use the R-square values to explain how good the model explains the dependent variable and if yes, how will it be done

I have a VAR model, can I use the R-square values to explain how good the model explains the dependent variable (explanatory power of the model) and if yes, how will the values of the R-square be ...
user avatar
0 votes
3 answers
160 views

Why do I get a lower R-squared value when I add more variables to my multiple linear regression?

I'm using the Regression Learner tool in MATLAB to do robust linear regression on a set of variables. However, with only one variable I get a higher R-squared value than when I'm adding one or two ...
user avatar
1 vote
1 answer
172 views

Why would my R Squared increase AND my RMSE increase when I add more variables to a model?

I ran a regression with tidymodels following this following along with the random forest example here but using different data. When I ran it with four variables or so, I got an R Squared of 0.94 but ...
user avatar
1 vote
1 answer
32 views

Is there any way to determine VIF of some variable that is included in the dataset that has so many variables?

I am new in statistics and need some help to determine the VIF value on all my variables/features in the dataset with a lot of variables. I have 98 variables with 76 observations and need to find VIF ...
user avatar
1 vote
0 answers
49 views

do we need to consider the R square of a tree based regression (randomforest), when we use the regression for feature selection

I want select the importance features from 800 features. i plan to use the randomforest regression (XGBoost either). after i build the random forest regression model and then i use the ....
user avatar
1 vote
1 answer
97 views

Equation difference of Q² and R²

I'm quite new to this field and would appreciate your help! As mentioned in this thread, here are the equations for R² and Q²: $R² = 1 - (RSS / TSS)$ where: $RSS = \sum (y-ŷ)²$ where: $TSS = \sum(y-\...
user avatar
  • 11
0 votes
0 answers
12 views

How to figure out whether the model contains suppressors, enhancers, or redundant predictor variables?

So, I'm having a super-hard time understanding these concepts. I have created a model with one outcome variable and several predictors. Through the model, I have access to partial and semi-partial ...
user avatar
  • 1

1
2 3 4 5
20