# Re: st: weighted least squares with time dummy variables, Clive Nicholas

 From "Clive Nicholas" <[email protected]> To [email protected] Subject Re: st: weighted least squares with time dummy variables, Clive Nicholas Date Thu, 25 Jan 2007 18:22:35 -0000 (GMT)

```Do Han Kim wrote:

> I understand why coefficients of dummy variables change as I change
> the reference group.  But, should slope coefficient (continuous
> variable) be consistent regardless of which reference group I include?
> For example, if I run the following two models(1) and(2), (w1fer and
> w1awer are continuous variables and w1pydu1-w1pydu6 are dummy
> variables. All are multiplied by weights), should w1awer show
> consistent coefficient?  Otherwise, which output should I report as my
> result?

This problem must be peculiar to your own data, because it's not witnessed
here, using -wls0- again:

. webuse grunfeld

. tab time, gen(t)

. g weight=(1/invnorm(uniform()))^2

. wls0 invest mvalue kstock t1- t19, wvar(weight) type(abse)

WLS regression -  type: proportional to abs(e)

(sum of wgt is   3.3734e+00)

Source |       SS       df       MS            Number of obs =     200
-------------+------------------------------         F( 21,   178) =   37.84
Model |  7570651.26    21  360507.203         Prob > F      =  0.0000
Residual |  1695667.55   178  9526.22222         R-squared     =  0.8170
Total |  9266318.82   199  46564.4162         Root MSE      =  97.602

----------------------------------------------------------------------------
invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
mvalue |   .1170477   .0063095    18.55   0.000     .1045967    .1294987
kstock |   .2191208   .0322738     6.79   0.000     .1554322    .2828093

[...]

_cons |  -35.87942   35.74122    -1.00   0.317    -106.4105    34.65162
----------------------------------------------------------------------------

. wls0 invest mvalue kstock t2- t20, wvar(weight) type(abse)

WLS regression -  type: proportional to abs(e)

(sum of wgt is   3.3734e+00)

Source |       SS       df       MS            Number of obs =     200
-------------+------------------------------         F( 21,   178) =   37.84
Model |  7570651.26    21  360507.203         Prob > F      =  0.0000
Residual |  1695667.55   178  9526.22222         R-squared     =  0.8170
Total |  9266318.82   199  46564.4162         Root MSE      =  97.602

----------------------------------------------------------------------------
invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
mvalue |   .1170477   .0063095    18.55   0.000     .1045967    .1294987
kstock |   .2191208   .0322738     6.79   0.000     .1554322    .2828093

[...]

_cons |  -23.71396   31.27414    -0.76   0.449    -85.42974    38.00183
----------------------------------------------------------------------------

I don't witness this in my own data, either. The constant changes along
with the change of dummies. Try -wls0- as I suggested and see what
happens.

Another solution to is to constrain your dummy coefficients to 1 or 0 -
whichever is the most appropriate - and then running -reg- (or -wls0-)
with the -nocons- option.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```

• Follow-Ups:
• References: