0
$\begingroup$

I have a daily collected time-series of temperature data that goes from 1981 to 2018 that look like this:

head(extracted_data)
   value          t quarter year
1 298.92 1981-08-25      Q3 1981
2 298.20 1981-08-26      Q3 1981
3 297.78 1981-08-27      Q3 1981
4 298.14 1981-08-28      Q3 1981
5 297.50 1981-08-29      Q3 1981
6 298.25 1981-08-30      Q3 1981

I'd like to build a regression model to get the annual change of temperature. In order to consider the seasonality of temperature, I built the model as the following:

model <- lm(value ~ quarter + year, data=extracted_data)

which gives me this:

summary(model)

Call:
lm(formula = value ~ quarter + year, data = extracted_data)

Residuals:
     Min       1Q   Median       3Q      Max 
-10.5027  -1.2918  -0.0495   1.1469   9.4846 

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 2.060e+02  3.596e+00   57.28   <2e-16 ***
quarterQ2   4.506e+00  5.532e-02   81.45   <2e-16 ***
quarterQ3   1.161e+01  5.501e-02  210.97   <2e-16 ***
quarterQ4   4.909e+00  5.481e-02   89.56   <2e-16 ***
year        4.070e-02  1.798e-03   22.63   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 2.265 on 13638 degrees of freedom
Multiple R-squared:  0.7711,    Adjusted R-squared:  0.771 
F-statistic: 1.148e+04 on 4 and 13638 DF,  p-value: < 2.2e-16

From this, can I say that the temperature is expected to increase by 0.0407 Kelvin degrees every year? Is the approach correct? I'm sorry I'm not a statistician!

$\endgroup$
3
  • $\begingroup$ If you want just the effect of year, you should do lm(value ~ year, data=extracted_data). But follow @MrFlick's advice and post to CV. $\endgroup$ – Rui Barradas Nov 23 '20 at 17:04
  • $\begingroup$ From this you cannot legitimately say anything about future increases in temperature (as otherwise intimated by phrases like "is expected to"): this analysis has revealed something about how temperature and year are associated in this dataset. One might characterize it as saying "controlling for quarterly seasonal variation, on average the temperature increased by 0.04 degrees C per year from 1981 through 2018." $\endgroup$ – whuber Nov 23 '20 at 18:34
  • $\begingroup$ Thank you whuber for your answer! So, the only way I could do some predictions with my model is by using a new data set provided with forecasted covariates? Is there no way to generalize the result? $\endgroup$ – Salvatore Valente Nov 24 '20 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.