To: 'Liaw, Andy'; 'Charles H. Franklin'; r-help@stat.math.ethz.ch
Subject: Re: [R] Matrix of dummy variables from a factor
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
What is a simple way to convert a factor into a matrix of dummy variables?
fm-lm(y~f)
where f is a factor takes care of this in the estimation. I'd like to
save the result of expanding f into a matrix for later use.
Thanks.
Charles
--
Charles H. Franklin
Professor, Political Science
See ?model.matrix.
HTH,
Andy
From: Charles H. Franklin
What is a simple way to convert a factor into a matrix of
dummy variables?
fm-lm(y~f)
where f is a factor takes care of this in the estimation. I'd like to
save the result of expanding f into a matrix for later use.
Thanks.
: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Charles H. Franklin
Sent: Tuesday, December 06, 2005 3:03 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Matrix of dummy variables from a factor
What is a simple way to convert a factor into a matrix of
dummy variables?
fm-lm(y
Charles H. Franklin wrote:
What is a simple way to convert a factor into a matrix of dummy variables?
fm-lm(y~f)
model.matrix(y~f)
Uwe Ligges
where f is a factor takes care of this in the estimation. I'd like to
save the result of expanding f into a matrix for later use.
Thanks.
, December 06, 2005 12:30 PM
To: 'Charles H. Franklin'; r-help@stat.math.ethz.ch
Subject: Re: [R] Matrix of dummy variables from a factor
See ?model.matrix.
HTH,
Andy
From: Charles H. Franklin
What is a simple way to convert a factor into a matrix of
dummy variables?
fm-lm(y~f
. Franklin'; r-help@stat.math.ethz.ch
Subject: Re: [R] Matrix of dummy variables from a factor
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
On 06-Dec-05 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
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
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
2000
+61 (2) 9292 1566
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Berton Gunter
Sent: Wednesday, 7 December 2005 8:27 AM
To: 'Liaw, Andy'; 'Charles H. Franklin'; r-help@stat.math.ethz.ch
Subject: Re: [R] Matrix of dummy variables from a factor
11 matches
Mail list logo