I have a dependent variable y, and the regressors are age, year and cohort (birth year). birth year is created by subtracting age from the base year, say 1998.
Of course, age, year and birth year are collinear, and each group will also consist of a full set of dummies.
My strategy is to put constraints on the coefficients of age. Specifically, age(n+1) = age(n) -1 for each age group n from 1 to N-1, where N is the number of total age group. Then I run the following regression.
let's say my base year is 1998, base age is A and base birth year is B = 1998-A. And there are N constraints.
* regression 1 cnsreg y ibA.age ib1998.year ibB.birth, baselevels col c(1-N)
And if I do not include col option, stata omits the last year group due to collinearity but still runs and produce results.
Now instead of using i.variables, I create the same set of dummies myself. I run the following regression with redefined same constraints on age effects, and I added three constraints to set the coefficients of the base group (A for age, B for birth and 1998 for year) dummies to 0.
* regression 2 cnsreg y age_dummies year_dummies birth_dummies, baselevels col c(1-(N+3))
I got the same result as the original regression 1.
However, when I delete col in regression 2, stata ommited the last age group, the last birth group and two more year groups (I have 4 year groups) again due to collinearity. However, it now reports error message "redundant or inconsistent constraints".
Why does deleting col option here in regression 2 produces a very different result from deleting col in regression 1? Aren't these two regressions essentially the same?
I'm very confused. Someone please help.
Related Posts with cnsreg using i.variables produces different results from self generated dummies
How to draw two base lines using coefplot command on stata.Hey! I'm trying to create a graph similar to the one attached with this post. I have two problems: 1…
Converting week to dateHi there, I'm currently working on a data that consist of 'date of birth' and 'gestational age' in …
Reshape : , not allowedHi everyone! I have results of interviews (one person interviewed in each household). There is info…
-tabplot- (SSC) ignoring scheme-specific subtitle size?Dear Nick, I use -tabplot- from SSC in version 2.7.2 NJC 30 June 2017 and wonder why -tabplot- ignor…
Generating a date sheet/calendar in StataHi I have to generate a date sheet/calendar (week wise preferably) which looks at the application o…
Subscribe to:
Post Comments (Atom)
0 Response to cnsreg using i.variables produces different results from self generated dummies
Post a Comment