[R-SIG-Finance] Fwd: Using dummy variables R

Patrick Burns patrick at burns-stat.com
Fri Feb 13 09:30:42 CET 2009


If you give 'lm' factors representing your
variables instead of dummy variables, then
it will take care of the identification problem
itself.  That's much easier all around.  Your
only problem -- if you care -- is understanding
the meaning of the individual coefficients.  But
I doubt that is a very big problem.


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")

P vanzweden wrote:
>  Dear R-helpers,
>
>
>
> I have the following model: Return ~ intercept+ EU + AUS + ASIA + USA +
> office +
> retail + industrial + residential.
>
> The model consist of an intercept ,region- and sector - dummies.
>
>
>
> When including all the dummies and the intercept, I will be caught in a so
> called "dummy variable trap". This problem is a perfect multicollinearity;
> because the regression is not solvable since the X matrix is not fully
> ranked.
>
>
>
> To estimate the model that includes all dummies variables and the intercept,
> I need to imposes two restriction that the sum of the region parameters is
> zero and the sum of the sector parameters is zero.
>
>
>
> How can I estimate this restricted linear regression model in  R?
>
>
> Is this possible to do this in the lm framework?
>
> Thanks in advance,
>
> Peter
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>
>



More information about the R-SIG-Finance mailing list