I am trying to use grqreg from SSC (grqreg from http://fmwww.bc.edu/RePEc/bocode/g) and I get the error message 'invalid name r(198). From the grqreg help:
I have noticed from other posts that there are sometimes problems with grqreg and variable labels but I cannot see any obvious problems.
I would be grateful for any advice.
Thank you,
Martyn
Stata/IC 14.2, 64bit Windows 10
Code:
sysuse auto, clear . xi: qreg price mpg i.foreign*i.rep78 headroom, nolog i.foreign _Iforeign_0-1 (naturally coded; _Iforeign_0 omitted) i.rep78 _Irep78_1-5 (naturally coded; _Irep78_1 omitted) i.for~n*i.rep78 _IforXrep_#_# (coded as above) note: _IforXrep_1_2 omitted because of collinearity note: _IforXrep_1_5 omitted because of collinearity Median regression Number of obs = 69 Raw sum of deviations 65163 (about 5079) Min sum of deviations 53809.48 Pseudo R2 = 0.1742 ------------------------------------------------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval] --------------+---------------------------------------------------------------- mpg | -207.56 73.64451 -2.82 0.007 -354.9223 -60.19768 _Iforeign_1 | -419.44 2211.803 -0.19 0.850 -4845.248 4006.368 _Irep78_2 | 909.88 2319.452 0.39 0.696 -3731.332 5551.092 _Irep78_3 | 744.72 2144.908 0.35 0.730 -3547.231 5036.671 _Irep78_4 | 762.56 2306.418 0.33 0.742 -3852.571 5377.691 _Irep78_5 | 2961.16 2919.27 1.01 0.315 -2880.286 8802.606 _IforXrep_1_2 | 0 (omitted) _IforXrep_1_3 | 520 2857.738 0.18 0.856 -5198.32 6238.32 _IforXrep_1_4 | 1989.68 2713.246 0.73 0.466 -3439.513 7418.873 _IforXrep_1_5 | 0 (omitted) headroom | -149.2 468.5678 -0.32 0.751 -1086.802 788.402 _cons | 8893.88 2738.334 3.25 0.002 3414.487 14373.27 ------------------------------------------------------------------------------- . grqreg, cons ci ols olsci o._IforXrep_1_2 invalid name r(198); . d,f Contains data from http://www.stata-press.com/data/r14/auto.dta obs: 74 1978 Automobile Data vars: 21 13 Apr 2014 17:45 size: 3,848 (_dta has notes) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ storage display value variable name type format label variable label ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ make str18 %-18s Make and Model price int %8.0gc Price mpg int %8.0g Mileage (mpg) rep78 int %8.0g Repair Record 1978 headroom float %6.1f Headroom (in.) trunk int %8.0g Trunk space (cu. ft.) weight int %8.0gc Weight (lbs.) length int %8.0g Length (in.) turn int %8.0g Turn Circle (ft.) displacement int %8.0g Displacement (cu. in.) gear_ratio float %6.2f Gear Ratio foreign byte %8.0g origin Car type _Iforeign_1 byte %8.0g foreign==1 _Irep78_2 byte %8.0g rep78==2 _Irep78_3 byte %8.0g rep78==3 _Irep78_4 byte %8.0g rep78==4 _Irep78_5 byte %8.0g rep78==5 _IforXrep_1_2 byte %8.0g foreign==1 & rep78==2 _IforXrep_1_3 byte %8.0g foreign==1 & rep78==3 _IforXrep_1_4 byte %8.0g foreign==1 & rep78==4 _IforXrep_1_5 byte %8.0g foreign==1 & rep78==5
I would be grateful for any advice.
Thank you,
Martyn
Stata/IC 14.2, 64bit Windows 10
Comment