[R] Matrix of dummy variables from a factor

roger koenker rkoenker at uiuc.edu
Wed Dec 7 00:31:19 CET 2005


On Dec 6, 2005, at 3:27 PM, Berton Gunter wrote:

> But note: There are (almost?) no situations in R where the dummy  
> variables
> coding is needed. The coding is (almost?) always handled properly  
> by the
> modeling functions themselves.
>
> Question: Can someone provide a "straightforward" example where the  
> dummy
> variable coding **is** explicitly needed?
>

Bert's  question offers an opportunity for me to mention (again) my  
long standing wish
for someone to write a version of model.matrix that directly produced  
a matrix
in one of the common  sparse matrix formats.   This could be a good   
project for one of
you who like using ";" ?

Roger

url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    rkoenker at uiuc.edu            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Champaign, IL 61820




More information about the R-help mailing list