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
Regression designHello, I'm trying to run a regression to test whether firms’ capital structure changes more during t…
graph bar with both exclude0 and stack - any way to both stack and control the y axis range?Hello Statalist, I'd like to use graph bar with both its exclude0 and stack options. In other words…
When to winsorize the dataHello everyone, for the first time I am working with variables that are aggregated at the country-y…
Dummy-Variable for half yearly observationsHello, my dataset contains half yearly data from 2000 - 2018 which is written as 2000h1 or 2000h2. …
Model selection when we implement multiple imputation (MI) by MICEDear Stata team, I've carried out multiple imputation for 3 covariate variables and 5 outcome varia…
Subscribe to:
Post Comments (Atom)
0 Response to cnsreg using i.variables produces different results from self generated dummies
Post a Comment