Re: [R] Creating dummy variables in r

2013-01-30 Thread peter dalgaard
On Jan 30, 2013, at 04:58 , Bert Gunter wrote: > You almost never need dummy variables in R. R creates them > automatically from factors given model and possibly contrasts > specification. > > ?contrasts ## for some technical details. > > If you have not read "An Introduction to R" do so now.

Re: [R] Creating dummy variables in r

2013-01-29 Thread Bert Gunter
You almost never need dummy variables in R. R creates them automatically from factors given model and possibly contrasts specification. ?contrasts ## for some technical details. If you have not read "An Introduction to R" do so now. Pay particular attention to the chapter on modeling and categor

Re: [R] Creating Dummy Variables in R

2009-12-16 Thread Tom Fletcher
Is your variable Clarity a categorical with 4 levels? Thus, the need for k-1 (3) dummies? Your error may be the result of creating k instead of k-1 dummies, but can't be sure from the example. In R, you don't have to (unless you really want to) explicitly create separate variables. You can use the

Re: [R] Creating Dummy Variables in R

2009-12-16 Thread Achim Zeileis
On Wed, 16 Dec 2009, whitaker m. (mw1006) wrote: Hi, I am trying to create a set of dummy variables to use within a multiple linear regression and am unable to find the codes within the manuals. For example i have: Price Weight Clarity IF VVS1VVS2 5

Re: [R] Creating Dummy Variables in R

2009-12-16 Thread S Devriese
On 12/16/2009 03:58 PM, whitaker m. (mw1006) wrote: > Hi, > I am trying to create a set of dummy variables to use within a multiple > linear regression and am unable to find the codes within the manuals. > > For example i have: > Price Weight Clarity > IF