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

[R] Creating dummy variables in r

2013-01-29 Thread Joseph Norman Thomson
Hello, Semi-new r user here and still learning the ropes. I am creating dummy variables for a dataset on stock prices in r. One dummy variable is called prev1 and is: prev1 <- ifelse(ret1 >= .5, 1, 0) where ret1 is the previous day's return. The variable "prev1" is created fine and works in my

Re: [R] Creating Dummy Variables in R

2009-12-16 Thread Tom Fletcher
om: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of whitaker m. (mw1006) Sent: Wednesday, December 16, 2009 8:59 AM To: r-help@r-project.org Subject: [R] Creating Dummy Variables in R Hi, I am trying to create a set of dummy variables to use within a multiple linear

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

[R] Creating Dummy Variables in R

2009-12-16 Thread whitaker m. (mw1006)
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 5008 1 0 0 1000