Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
994 views
in Technique[技术] by (71.8m points)

statistics - Negative adjusted R squared in svyglm

I have a large, weighted and stratified dataset containing among other things co2 emissions per household. The variable total_co2 equals the sum elec_co2 + gas_co2 + oil_co2. Before moving to more complex relationships I tried to construct a seemingly obvious model.

svy <- svydesign(id=~i_psu,
                 strata=~i_strata,
                 weights=~i_hhdenui_xw,
                 data=df1)

model <- svyglm(total_co2 ~ elec_co2, svy)
summ(model)
MODEL INFO:
Observations: 6826
Dependent Variable: total_co2
Type: Survey-weighted linear regression 

MODEL FIT:
R2 = 0.31
Adj. R2 = -1.74 

Standard errors: Robust
---------------------------------------------------
                       Est.    S.E.   t val.      p
----------------- --------- ------- -------- ------
(Intercept)         1962.48   83.68    23.45   0.00
elec_co2               1.27    0.05    23.98   0.00
---------------------------------------------------

Estimated dispersion parameter = 4390445

While the R^2 indicates some explanatory power, the Adj. R^2 is negative, which is usually interpreted as indicating the opposite. How is this possible in such a simple relationship? Where does the negative value come from and how should I interpret it?

Here is a simple plot of the data. enter image description here

question from:https://stackoverflow.com/questions/65832794/negative-adjusted-r-squared-in-svyglm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Short answer: the adjusted R-squared formula allows negative answers and if the chosen model fits worse than a horizontal line, then R-squared is negative.

Long answer: This other comment goes much more in-depth into negative R-squared values: https://stats.stackexchange.com/q/12991

This webpage goes in-depth into the adjusted R-squared formula: https://www.statisticshowto.com/adjusted-r2/

I recommend trying other models or adding the elec_co2, gas_co2, and oil_co2 separately.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...