0

How do I interpret the coefficients of a Regression with 1 continuous + 1 categorical predictor (with 4 levels - e.g., months)

Specifically, is the 1st coefficient equal to that of the 1st month or equal to the case in which there was no month??

Use this table to help explain:

                        Value    Std.Error    t-value       p-value
(Intercept)      0.2772475891 0.0113379058 24.4531568 8.535808e-106
I(year - 1950)   0.0009540568 0.0002015887  4.7326911  2.504407e-06
factor(season)2  0.0166704599 0.0151419786  1.1009433  2.711624e-01
factor(season)3  0.0769897290 0.0151419786  5.0845224  4.329953e-07
factor(season)4 -0.0096468223 0.0151419786 -0.6370913  5.241981e-01

As a follow-up: what is the interpretation if only some of the categorical variables are significant (and others are not)? Further, do I keep them all if this is the case?


Here is an example of the format of my data:

    year season   temp.avg   ppt.avg       GDD   pdo
1   1922      1  0.4935484 0.3535484  14.40737 -0.45
2   1923      1  4.3892857 0.4542857  56.03017 -1.51
3   1924      2  7.3032258 0.5435484 106.49244 -1.76
4   1925      3 12.8533333 0.2583333 239.07739 -1.71
5   1926      4 19.7903226 0.4667742 458.50000 -1.61
6   1927      1 24.2766667 0.3146667 578.30000 -1.11

>summary(gls(ppt.avg ~ I(year - 1950) + factor(season), data = df, method = 'ML'))
Generalized least squares fit by maximum likelihood
  Model: ppt.avg ~ I(year - 1950) + factor(season) 
  Data: df
        AIC       BIC   logLik
  -672.3348 -602.2411 350.1674
theforestecologist
  • 1,777
  • 3
  • 21
  • 40
  • Please feel free to edit my question and add more scenarios. Just don't get too crazy – theforestecologist Mar 04 '16 at 20:52
  • It's too general a question, and the answer would really be a chapter or a long article. Why don't you settle for a very concrete single question, instead? – Antoni Parellada Mar 04 '16 at 20:56
  • @AntoniParellada changed – theforestecologist Mar 04 '16 at 21:01
  • 1
    This looks like another question about interpreting regression output with categorical variables. We're getting one every few days now--and therefore you can find many examples and explanations elsewhere on this site. – whuber Mar 04 '16 at 23:36
  • 1
    I'm sure this has been explained many times (& is thus a duplicate of something). I don't see this as too broad, however. – gung - Reinstate Monica Mar 04 '16 at 23:43
  • 1
    On dropping levels see [Can I ignore coefficients for non-significant levels of factors in a linear model?](http://stats.stackexchange.com/q/24298/17230), [If a factor variable is to be dropped in model selection, should all levels be dropped simultaneously?](http://stats.stackexchange.com/q/18745/17230), [Regression with categorical predictors - use only some dummy variables](http://stats.stackexchange.com/q/146351/17230), [Is it advisable to drop certain levels of a categorical variable?](http://stats.stackexchange.com/q/141063/17230), ... – Scortchi - Reinstate Monica Mar 24 '16 at 15:41
  • 1
    ... & [What to do with dummy variable that is not significant?](http://stats.stackexchange.com/q/187877/17230). Also [Significance of categorical predictor in logistic regression](http://stats.stackexchange.com/q/60817/17230) [Interpreting coefficient in a linear regression model with categorical variables](http://stats.stackexchange.com/questions/13353/interpreting-coefficient-in-a-linear-regression-model-with-categorical-variables) have clear explanations of reference-level coding. http://www.ats.ucla.edu/stat/r/library/contrast_coding.htm gives details of various coding schemes. – Scortchi - Reinstate Monica Mar 24 '16 at 15:41

0 Answers0