1
$\begingroup$

This is related to a question I asked a couple weeks ago, but I've got a new question related to the same data. You can find the data and its accompanying explanation in the link provided.

I felt that a regression including year as a covariate along with year dummies would lead to a linear dependence problem, but I was told to try it anyway as

"the year dummies as independent variables [may] pick up year-specific random effects not accounted for by a time trend, e.g. for example the trend over all years could be down by say 2 percent per year which could apply to most years, but a negative macro shock in one particular year could make that year lie way off the regression line--a simple example of why the year dummies are not co-linear with a time trend."

This makes sense, I suppose, so I ran a regression that simply included year and year dummies for each year as the independent variables (including AR(1) corrections). This looked like the following:

> ## Generate YearFactor and AgeGroupFactor using factor()
> 
> YearFactor <- factor(YearVar)
> AgeGroupFactor <- factor(AgeGroup)
> 
> ## Check to see that YearFactor and AgeGroupFactor are indeed factor variables
> 
> is.factor(YearFactor)
[1] TRUE
> is.factor(AgeGroupFactor)
[1] TRUE
>
> ## Run regressions with both time trend and year dummies to determine if a linear dependence problem exists.
> 
> TrendDummies <- gls(PPHPY ~ YearVar + YearFactor, correlation=corARMA(p=1))
Error in glsEstimate(object, control = control) : 
 computed "gls" fit is singular, rank 13
> summary(TrendDummies)
Error in summary(TrendDummies) : object 'TrendDummies' not found
>

I interpret the error message "Error in glsEstimate(object, control = control) : computed "gls" fit is singular, rank 13" to mean that there indeed is a linear dependence problem in this case. Am I properly interpreting this?

Also, given the advice in quotes above, would my regression as constructed (if there were no linear dependence problems) capture the effects mentioned therein?

And finally, if I run the same regression as OLS with no AR(1) correlation structure, I do indeed get some results (instead of an error message). Any thoughts on that?

$\endgroup$

1 Answer 1

2
$\begingroup$

Typically, you wouldn't include a time trend and time dummies for exactly the reasons that you highlight. The time dummies are more flexible and are generally preferred (you can test whether they are better than the time trend alone).

I'm guessing that the OLS gives you results, but throws out one of the time dummies (one more than usual, that is).

$\endgroup$
3
  • $\begingroup$ It indeed does. Is there any basis for the claim that it still may be helpful to include both the time trend and the dummies if some years lie significantly off the trend line? And would you say that the GLS regression error I'm getting confirms my linear dependence problem, or is the error getting at something else? $\endgroup$
    – thagzone
    Commented Jul 9, 2013 at 16:42
  • 1
    $\begingroup$ The error is probably the dependence issue. If the time trend was the appropriate model, then all the time dummies would line up on a straight line when plotted. To the extent that is not the case, then there is not a constant time trend. Typically, we use the more flexible model with time dummies. The time trend adds no information that you can't get from the time dummies alone. $\endgroup$
    – Charlie
    Commented Jul 10, 2013 at 15:51
  • $\begingroup$ Ok, thanks for confirming that for me. I felt certain this was the case, but I came here to verify it since I was being pushed on the issue and wasn't quite certain enough to stake a claim to it. Thanks for the answers! $\endgroup$
    – thagzone
    Commented Jul 10, 2013 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.